fix: test cases enhancement
This commit is contained in:
@@ -895,6 +895,10 @@ func TestCacheSuccess(t *testing.T) {
|
||||
t.Error("expected non-nil cache, got nil")
|
||||
}
|
||||
|
||||
if cache != tt.plugin.cache {
|
||||
t.Error("cache does not match expected instance")
|
||||
}
|
||||
|
||||
if len(m.closers) != 1 {
|
||||
t.Errorf("Manager.closers has %d closers, expected 1", len(m.closers))
|
||||
}
|
||||
@@ -1008,6 +1012,10 @@ func TestSignerSuccess(t *testing.T) {
|
||||
t.Error("expected non-nil signer, got nil")
|
||||
}
|
||||
|
||||
if signer != tt.plugin.signer {
|
||||
t.Error("signer does not match expected instance")
|
||||
}
|
||||
|
||||
if len(m.closers) != 1 {
|
||||
t.Errorf("Manager.closers has %d closers, expected 1", len(m.closers))
|
||||
}
|
||||
@@ -1121,6 +1129,10 @@ func TestEncryptorSuccess(t *testing.T) {
|
||||
t.Error("expected non-nil encrypter, got nil")
|
||||
}
|
||||
|
||||
if encrypter != tt.plugin.encrypter {
|
||||
t.Error("encrypter does not match expected instance")
|
||||
}
|
||||
|
||||
if len(m.closers) != 1 {
|
||||
t.Errorf("Manager.closers has %d closers, expected 1", len(m.closers))
|
||||
}
|
||||
@@ -1234,6 +1246,10 @@ func TestDecryptorSuccess(t *testing.T) {
|
||||
t.Error("expected non-nil decrypter, got nil")
|
||||
}
|
||||
|
||||
if decrypter != tt.plugin.decrypter {
|
||||
t.Error("decrypter does not match expected instance")
|
||||
}
|
||||
|
||||
if len(m.closers) != 1 {
|
||||
t.Errorf("Manager.closers has %d closers, expected 1", len(m.closers))
|
||||
}
|
||||
@@ -1467,6 +1483,10 @@ func TestKeyManagerSuccess(t *testing.T) {
|
||||
t.Error("expected non-nil key manager, got nil")
|
||||
}
|
||||
|
||||
if keyManager != tt.plugin.keyManager {
|
||||
t.Error("key manager does not match expected instance")
|
||||
}
|
||||
|
||||
if len(m.closers) != 1 {
|
||||
t.Errorf("Manager.closers has %d closers, expected 1", len(m.closers))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user