Debian Codegraph @

pkg/crc/cluster/kubeadmin_password_test.go

raw symbols SCIP
1 package clusterscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/
2
3 import (
4 "testingscip-go gomod github.com/golang/go/src go1.20 testing/"
5
6 "github.com/stretchr/testify/assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/"
7 )
8
9 func TestCompareHtpasswdWithOneUsernamescip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/TestCompareHtpasswdWithOneUsername().(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) {
10 htpasswd, err := getHtpasswdscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/getHtpasswd().(map[string]string{"username": "password1"}, []string{})
11 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err)
12
13 ok, _, err := compareHtpasswdscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/compareHtpasswd().(htpasswd, map[string]string{"username": "password1"})
14 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err)
15 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Truescip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/True().(t, ok)
16
17 ok, _, err = compareHtpasswdscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/compareHtpasswd().(htpasswd, map[string]string{"username": "password2"})
18 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err)
19 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Falsescip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/False().(t, ok)
20
21 ok, _, err = compareHtpasswdscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/compareHtpasswd().(htpasswd, map[string]string{"other": "password1"})
22 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err)
23 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Falsescip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/False().(t, ok)
24
25 ok, _, err = compareHtpasswdscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/compareHtpasswd().(htpasswd, map[string]string{"username1": "password1", "username2": "password2"})
26 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err)
27 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Falsescip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/False().(t, ok)
28 }
29
30 func TestCompareHtpasswdWithTwoUsernamesscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/TestCompareHtpasswdWithTwoUsernames().(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) {
31 htpasswd, err := getHtpasswdscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/getHtpasswd().(map[string]string{"username1": "password1", "username2": "password2"}, []string{})
32 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err)
33
34 ok, _, err := compareHtpasswdscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/compareHtpasswd().(htpasswd, map[string]string{"username1": "password1", "username2": "password2"})
35 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err)
36 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Truescip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/True().(t, ok)
37
38 ok, _, err = compareHtpasswdscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/compareHtpasswd().(htpasswd, map[string]string{"username1": "password1", "username2": "password3"})
39 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err)
40 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Falsescip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/False().(t, ok)
41 }
42
43 func TestCompareFalseWithCustomEntriesscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/TestCompareFalseWithCustomEntries().(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) {
44 wanted := map[string]string{"username": "password"}
45
46 htpasswd, err := getHtpasswdscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/getHtpasswd().(map[string]string{"username": "wrong", "external1": "external1", "external2": "external2"}, []string{})
47 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err)
48
49 ok, externals, err := compareHtpasswdscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/compareHtpasswd().(htpasswd, wanted)
50 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err)
51 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Falsescip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/False().(t, ok)
52
53 htpasswd, err = getHtpasswdscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/getHtpasswd().(wanted, externals)
54 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err)
55 ok, _, err = compareHtpasswdscip-go gomod github.com/crc-org/crc/v2 . `github.com/crc-org/crc/v2/pkg/crc/cluster`/compareHtpasswd().(htpasswd, map[string]string{"username": "password", "external1": "external1", "external2": "external2"})
56 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/NoError().(t, err)
57 assertscip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/.Truescip-go gomod github.com/stretchr/testify v1.9.0 `github.com/stretchr/testify/assert`/True().(t, ok)
58 }