github.com/matcornic/migrate@v3.3.2-0.20180717234201-feea45c20506+incompatible/database/util_test.go (about)

     1  package database
     2  
     3  func TestGenerateAdvisoryLockId(t *testing.T) {
     4  	id, err := p.generateAdvisoryLockId("database_name")
     5  	if err != nil {
     6  		t.Errorf("expected err to be nil, got %v", err)
     7  	}
     8  	if len(id) == 0 {
     9  		t.Errorf("expected generated id not to be empty")
    10  	}
    11  	t.Logf("generated id: %v", id)
    12  }