... | ... |
@@ -25,13 +25,13 @@ for test_dir in $test_dirs |
25 | 25 |
do |
26 | 26 |
go tool vet -shadow=false $test_dir |
27 | 27 |
if [ "$?" -ne 0 ] |
28 |
- then |
|
28 |
+ then |
|
29 | 29 |
FAILURE=true |
30 | 30 |
fi |
31 | 31 |
done |
32 | 32 |
|
33 |
-# We don't want to exit on the first failure of go vet, so just keep track of |
|
34 |
-# whether a failure occured or not. |
|
33 |
+# We don't want to exit on the first failure of go vet, so just keep track of |
|
34 |
+# whether a failure occurred or not. |
|
35 | 35 |
if $FAILURE |
36 | 36 |
then |
37 | 37 |
echo "FAILURE: go vet failed!" |
... | ... |
@@ -39,4 +39,4 @@ then |
39 | 39 |
else |
40 | 40 |
echo "SUCCESS: go vet succeded!" |
41 | 41 |
exit 0 |
42 |
-fi |
|
43 | 42 |
\ No newline at end of file |
43 |
+fi |
... | ... |
@@ -106,7 +106,7 @@ func (l *LDAPClientConfig) Connect() (*ldap.Conn, error) { |
106 | 106 |
} |
107 | 107 |
|
108 | 108 |
// Bind binds to a given LDAP connection if a bind DN and password were given. |
109 |
-// Bind returns whether a bind occured and whether an error occurred |
|
109 |
+// Bind returns whether a bind occurred and whether an error occurred |
|
110 | 110 |
func (l *LDAPClientConfig) Bind(connection *ldap.Conn) (bound bool, err error) { |
111 | 111 |
if len(l.BindDN) > 0 { |
112 | 112 |
if err := connection.Bind(l.BindDN, l.BindPassword); err != nil { |
... | ... |
@@ -76,7 +76,7 @@ func (o *ValidateMasterConfigOptions) Complete(args []string) error { |
76 | 76 |
} |
77 | 77 |
|
78 | 78 |
// Run runs the master config validation and returns the result of the validation as a boolean as well as any errors |
79 |
-// that occured trying to validate the file |
|
79 |
+// that occurred trying to validate the file |
|
80 | 80 |
func (o *ValidateMasterConfigOptions) Run() (bool, error) { |
81 | 81 |
masterConfig, err := configapilatest.ReadAndResolveMasterConfig(o.MasterConfigFile) |
82 | 82 |
if err != nil { |
... | ... |
@@ -75,7 +75,7 @@ func (o *ValidateNodeConfigOptions) Complete(args []string) error { |
75 | 75 |
} |
76 | 76 |
|
77 | 77 |
// Run runs the node config validation and returns the result of the validation as a boolean as well as any errors |
78 |
-// that occured trying to validate the file |
|
78 |
+// that occurred trying to validate the file |
|
79 | 79 |
func (o *ValidateNodeConfigOptions) Run() (ok bool, err error) { |
80 | 80 |
nodeConfig, err := configapilatest.ReadAndResolveNodeConfig(o.NodeConfigFile) |
81 | 81 |
if err != nil { |
... | ... |
@@ -49,7 +49,7 @@ func (c *DeployerPodController) Handle(pod *kapi.Pod) error { |
49 | 49 |
// If the deployment for this pod has disappeared, we should clean up this |
50 | 50 |
// and any other deployer pods, then bail out. |
51 | 51 |
if err != nil { |
52 |
- // Some retrieval error occured. Retry. |
|
52 |
+ // Some retrieval error occurred. Retry. |
|
53 | 53 |
if !kerrors.IsNotFound(err) { |
54 | 54 |
return fmt.Errorf("couldn't get deployment %s/%s which owns deployer pod %s/%s", pod.Namespace, deploymentName, pod.Name, pod.Namespace) |
55 | 55 |
} |
... | ... |
@@ -63,7 +63,7 @@ is_event_template=( \ |
63 | 63 |
) |
64 | 64 |
is_event_template=$(IFS=""; echo "${is_event_template[*]}") # re-formats template for use |
65 | 65 |
|
66 |
-# wait until the last event that occured on the imagestream was the successful pull of the latest image |
|
66 |
+# wait until the last event that occurred on the imagestream was the successful pull of the latest image |
|
67 | 67 |
wait_for_command 'oc get imagestream openldap --template="${is_event_template}" | grep latest' $((60*TIME_SEC)) |
68 | 68 |
|
69 | 69 |
# kick off a build and wait for it to finish |
... | ... |
@@ -86,7 +86,7 @@ server_ready_template=( \ |
86 | 86 |
server_ready_template=$(IFS=$""; echo "${server_ready_template[*]}") # re-formats template for use |
87 | 87 |
|
88 | 88 |
# wait for LDAP server to be ready |
89 |
-wait_for_command 'oc get pods -l deploymentconfig=openldap-server --template="${server_ready_template}" | grep "ReadyTrue "' $((60*TIME_SEC)) |
|
89 |
+wait_for_command 'oc get pods -l deploymentconfig=openldap-server --template="${server_ready_template}" | grep "ReadyTrue "' $((60*TIME_SEC)) |
|
90 | 90 |
|
91 | 91 |
# TODO(skuznets): readiness check is premature |
92 | 92 |
sleep 10 |
... | ... |
@@ -99,7 +99,7 @@ LDAP_SERVICE_IP=$(oc get --output-version=v1beta3 --template="{{ .spec.portalIP |
99 | 99 |
function compare_and_cleanup() { |
100 | 100 |
validation_file=$1 |
101 | 101 |
actual_file=actual-${validation_file}.yaml |
102 |
- rm -f ${WORKINGDIR}/${actual_file} |
|
102 |
+ rm -f ${WORKINGDIR}/${actual_file} |
|
103 | 103 |
oc get groups --no-headers | awk '{print $1}' | sort | xargs -I{} oc export group {} -o yaml >> ${WORKINGDIR}/${actual_file} |
104 | 104 |
os::util::sed '/sync-time/d' ${WORKINGDIR}/${actual_file} |
105 | 105 |
diff ${validation_file} ${WORKINGDIR}/${actual_file} |
... | ... |
@@ -122,13 +122,13 @@ for (( i=0; i<${#schema[@]}; i++ )); do |
122 | 122 |
WORKINGDIR=${BASETMPDIR}/${current_schema} |
123 | 123 |
mkdir ${WORKINGDIR} |
124 | 124 |
|
125 |
- # create a temp copy of the test files |
|
125 |
+ # create a temp copy of the test files |
|
126 | 126 |
cp test/extended/authentication/ldap/${current_schema}/* ${WORKINGDIR} |
127 | 127 |
pushd ${WORKINGDIR} > /dev/null |
128 | 128 |
|
129 | 129 |
# load OpenShift and LDAP group UIDs, needed for literal whitelists |
130 | 130 |
# use awk instead of sed for compatibility (see os::util::sed) |
131 |
- group1_ldapuid=$(awk 'NR == 1 {print $0}' ldapgroupuids.txt) |
|
131 |
+ group1_ldapuid=$(awk 'NR == 1 {print $0}' ldapgroupuids.txt) |
|
132 | 132 |
group2_ldapuid=$(awk 'NR == 2 {print $0}' ldapgroupuids.txt) |
133 | 133 |
group3_ldapuid=$(awk 'NR == 3 {print $0}' ldapgroupuids.txt) |
134 | 134 |
|
... | ... |
@@ -167,14 +167,14 @@ for (( i=0; i<${#schema[@]}; i++ )); do |
167 | 167 |
oc patch group ${group1_osuid} -p 'users: []' |
168 | 168 |
openshift ex sync-groups --type=openshift --whitelist=whitelist_openshift.txt --sync-config=sync-config.yaml --confirm |
169 | 169 |
compare_and_cleanup valid_whitelist_sync.txt |
170 |
- |
|
170 |
+ |
|
171 | 171 |
echo -e "\tTEST: Sync subset of OpenShift groups from LDAP server using literal whitelist" |
172 | 172 |
# sync group from LDAP |
173 | 173 |
openshift ex sync-groups ${group1_ldapuid} --sync-config=sync-config.yaml --confirm |
174 | 174 |
oc patch group ${group1_osuid} -p 'users: []' |
175 | 175 |
openshift ex sync-groups --type=openshift ${group1_osuid} --sync-config=sync-config.yaml --confirm |
176 | 176 |
compare_and_cleanup valid_whitelist_sync.txt |
177 |
- |
|
177 |
+ |
|
178 | 178 |
echo -e "\tTEST: Sync subset of OpenShift groups from LDAP server using union of literal whitelist and whitelist file" |
179 | 179 |
# sync groups from LDAP |
180 | 180 |
openshift ex sync-groups ${group1_ldapuid} ${group2_ldapuid} --sync-config=sync-config.yaml --confirm |
... | ... |
@@ -182,7 +182,7 @@ for (( i=0; i<${#schema[@]}; i++ )); do |
182 | 182 |
oc patch group ${group2_osuid} -p 'users: []' |
183 | 183 |
openshift ex sync-groups --type=openshift group/${group2_osuid} --whitelist=whitelist_openshift.txt --sync-config=sync-config.yaml --confirm |
184 | 184 |
compare_and_cleanup valid_whitelist_union_sync.txt |
185 |
- |
|
185 |
+ |
|
186 | 186 |
|
187 | 187 |
# BLACKLISTS |
188 | 188 |
echo -e "\tTEST: Sync subset of LDAP groups from LDAP server using whitelist and blacklist file" |
... | ... |
@@ -201,7 +201,7 @@ for (( i=0; i<${#schema[@]}; i++ )); do |
201 | 201 |
# openshift ex sync-groups --type=openshift --whitelist=osgroupuids.txt --blacklist=blacklist_openshift.txt --blacklist-group=${group1_osuid} --sync-config=sync-config.yaml --confirm |
202 | 202 |
openshift ex sync-groups --type=openshift --whitelist=osgroupuids.txt --blacklist=blacklist_openshift.txt --sync-config=sync-config.yaml --confirm |
203 | 203 |
compare_and_cleanup valid_all_openshift_blacklist_sync.txt |
204 |
- |
|
204 |
+ |
|
205 | 205 |
|
206 | 206 |
# MAPPINGS |
207 | 207 |
echo -e "\tTEST: Sync all LDAP groups from LDAP server using a user-defined mapping" |
... | ... |
@@ -225,4 +225,4 @@ for (( i=0; i<${#schema[@]}; i++ )); do |
225 | 225 |
compare_and_cleanup valid_all_ldap_sync_dn_everywhere.txt |
226 | 226 |
|
227 | 227 |
popd > /dev/null |
228 |
-done |
|
229 | 228 |
\ No newline at end of file |
229 |
+done |
... | ... |
@@ -301,7 +301,7 @@ func (c *CLI) Execute() error { |
301 | 301 |
return err |
302 | 302 |
} |
303 | 303 |
|
304 |
-// FatalErr exits the test in case a fatal error has occured. |
|
304 |
+// FatalErr exits the test in case a fatal error has occurred. |
|
305 | 305 |
func FatalErr(msg interface{}) { |
306 | 306 |
e2e.Failf("%v", msg) |
307 | 307 |
} |