github.com/postmates/migrate@v3.0.2-0.20200730201548-1a6ead3e680d+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  }