Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bunch of failed quality rules (in tests) #6646

Merged
merged 1 commit into from
Sep 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/cloud_playbooks/upload-logs-gcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

- name: Apply the lifecycle rules # noqa 301
command: "{{ dir }}/google-cloud-sdk/bin/gsutil lifecycle set {{ dir }}/gcs_life.json gs://{{ test_name }}"
changed_when: false
environment:
BOTO_CONFIG: "{{ dir }}/.boto"
no_log: True
Expand Down
8 changes: 4 additions & 4 deletions tests/testcases/015_check-nodes-ready.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
- import_role:
name: cluster-dump

- name: Check kubectl output # noqa 305
shell: "{{ bin_dir }}/kubectl get nodes"
- name: Check kubectl output
command: "{{ bin_dir }}/kubectl get nodes"
changed_when: false
register: get_nodes
no_log: true

- debug:
msg: "{{ get_nodes.stdout.split('\n') }}"

- name: Check that all nodes are running and ready # noqa 305
shell: "{{ bin_dir }}/kubectl get nodes --no-headers -o yaml"
- name: Check that all nodes are running and ready
command: "{{ bin_dir }}/kubectl get nodes --no-headers -o yaml"
changed_when: false
register: get_nodes_yaml
until:
Expand Down
12 changes: 6 additions & 6 deletions tests/testcases/020_check-pods-running.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
- import_role:
name: cluster-dump

- name: Check kubectl output # noqa 305
shell: "{{ bin_dir }}/kubectl get pods --all-namespaces -owide"
- name: Check kubectl output
command: "{{ bin_dir }}/kubectl get pods --all-namespaces -owide"
changed_when: false
register: get_pods
no_log: true

- debug:
msg: "{{ get_pods.stdout.split('\n') }}"

- name: Check that all pods are running and ready # noqa 305
shell: "{{ bin_dir }}/kubectl get pods --all-namespaces --no-headers -o yaml"
- name: Check that all pods are running and ready
command: "{{ bin_dir }}/kubectl get pods --all-namespaces --no-headers -o yaml"
changed_when: false
register: run_pods_log
until:
Expand All @@ -38,8 +38,8 @@
failed_when: false
no_log: true

- name: Check kubectl output # noqa 305
shell: "{{ bin_dir }}/kubectl get pods --all-namespaces -owide"
- name: Check kubectl output
command: "{{ bin_dir }}/kubectl get pods --all-namespaces -owide"
changed_when: false
register: get_pods
no_log: true
Expand Down
21 changes: 11 additions & 10 deletions tests/testcases/030_check-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@

when: kubelet_rotate_server_certificates | default(false)

- name: Create test namespace # noqa 301 305
shell: "{{ bin_dir }}/kubectl create namespace test"
- name: Create test namespace
command: "{{ bin_dir }}/kubectl create namespace test"
changed_when: false

- name: Run 2 busybox pods in test ns # noqa 305
shell: "{{ bin_dir }}/kubectl run {{ item }} --image={{ test_image_repo }}:{{ test_image_tag }} --namespace test --command -- tail -f /dev/null"
- name: Run 2 busybox pods in test ns
command: "{{ bin_dir }}/kubectl run {{ item }} --image={{ test_image_repo }}:{{ test_image_tag }} --namespace test --command -- tail -f /dev/null"
changed_when: false
loop:
- busybox1
Expand All @@ -52,8 +53,8 @@
- import_role:
name: cluster-dump

- name: Check that all pods are running and ready # noqa 305
shell: "{{ bin_dir }}/kubectl get pods --namespace test --no-headers -o yaml"
- name: Check that all pods are running and ready
command: "{{ bin_dir }}/kubectl get pods --namespace test --no-headers -o yaml"
changed_when: false
register: run_pods_log
until:
Expand All @@ -66,8 +67,8 @@
failed_when: false
no_log: true

- name: Get pod names # noqa 305
shell: "{{ bin_dir }}/kubectl get pods -n test -o json"
- name: Get pod names
command: "{{ bin_dir }}/kubectl get pods -n test -o json"
changed_when: false
register: pods
no_log: true
Expand All @@ -90,8 +91,8 @@
register: running_pods
no_log: true

- name: Check kubectl output # noqa 305
shell: "{{ bin_dir }}/kubectl get pods --all-namespaces -owide"
- name: Check kubectl output
command: "{{ bin_dir }}/kubectl get pods --all-namespaces -owide"
changed_when: False
register: get_pods
no_log: true
Expand Down