|
|
@ -17,6 +17,8 @@ limitations under the License.
|
|
|
|
package driver // import "helm.sh/helm/v3/pkg/storage/driver"
|
|
|
|
package driver // import "helm.sh/helm/v3/pkg/storage/driver"
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
|
|
|
|
"reflect"
|
|
|
|
|
|
|
|
"sort"
|
|
|
|
"testing"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -47,3 +49,14 @@ func TestLabelsMatch(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func TestLabelsKeys(t *testing.T) {
|
|
|
|
|
|
|
|
var test = labels(map[string]string{"KEY_A": "VAL_A", "KEY_B": "VAL_B"})
|
|
|
|
|
|
|
|
var expect = []string{"KEY_A", "KEY_B"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result := test.keys()
|
|
|
|
|
|
|
|
sort.Strings(result)
|
|
|
|
|
|
|
|
if !reflect.DeepEqual(expect, result) {
|
|
|
|
|
|
|
|
t.Fatalf("Expected %v, got %v", expect, result)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|