It avoids dumping logs at the end which requires gcloud configured (CI).
Then it partially reverts "Keep kubernetes sources" [1].
It now dumps e2e.test output in e2e.log as sonobuoy [2].
[1] https://gerrit.opnfv.org/gerrit/68106
[2] https://raw.githubusercontent.com/cncf/k8s-conformance/master/v1.15/kubeadm/e2e.log
Change-Id: I400e1cf92a8540eba3d40db1ed4237628921efe6
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
make kubectl ginkgo && \
make WHAT=test/e2e/e2e.test && \
mv _output/bin/* /usr/local/bin) && \
make kubectl ginkgo && \
make WHAT=test/e2e/e2e.test && \
mv _output/bin/* /usr/local/bin) && \
- rm -r /src/k8s.io/kubernetes/.git /src/k8s.io/kubernetes/_output && \
apk del .build-deps
COPY testcases.yaml /usr/lib/python3.6/site-packages/xtesting/ci/testcases.yaml
CMD ["run_tests", "-t", "all"]
apk del .build-deps
COPY testcases.yaml /usr/lib/python3.6/site-packages/xtesting/ci/testcases.yaml
CMD ["run_tests", "-t", "all"]
process = subprocess.Popen(cmd_line, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
process = subprocess.Popen(cmd_line, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
- output = process.stdout.read().decode("utf-8")
+ boutput = process.stdout.read()
+ with open(os.path.join(self.res_dir, 'e2e.log'), 'wb') as foutput:
+ foutput.write(boutput)
+ output = boutput.decode("utf-8")
if ('Error loading client' in output or
'Unexpected error' in output):
raise Exception(output)
if ('Error loading client' in output or
'Unexpected error' in output):
raise Exception(output)
super(K8sSmokeTest, self).__init__(**kwargs)
self.cmd = ['e2e.test', '-ginkgo.focus', 'Guestbook.application',
'-ginkgo.noColor', '-kubeconfig', self.config,
super(K8sSmokeTest, self).__init__(**kwargs)
self.cmd = ['e2e.test', '-ginkgo.focus', 'Guestbook.application',
'-ginkgo.noColor', '-kubeconfig', self.config,
- '-provider', 'local', '-report-dir', self.res_dir]
+ '-provider', 'local', '-report-dir', self.res_dir,
+ '-disable-log-dump', 'true']
class K8sConformanceTest(K8sTesting):
class K8sConformanceTest(K8sTesting):
'e2e.test', '-ginkgo.focus', r'\[Conformance\]', '-ginkgo.noColor',
'-ginkgo.skip', r'Alpha|\[(Disruptive|Feature:[^\]]+|Flaky)\]',
'-kubeconfig', self.config, '-provider', 'local',
'e2e.test', '-ginkgo.focus', r'\[Conformance\]', '-ginkgo.noColor',
'-ginkgo.skip', r'Alpha|\[(Disruptive|Feature:[^\]]+|Flaky)\]',
'-kubeconfig', self.config, '-provider', 'local',
- '-report-dir', self.res_dir]
+ '-report-dir', self.res_dir, '-disable-log-dump', 'true']
mock_logger.exception.assert_called_with(
"Error with running kubetest:")
mock_logger.exception.assert_called_with(
"Error with running kubetest:")
+ @mock.patch('six.moves.builtins.open', mock.mock_open())
@mock.patch('functest_kubernetes.k8stest.os.path.isfile')
@mock.patch('functest_kubernetes.k8stest.subprocess.Popen')
def test_run(self, mock_open, mock_isfile):
@mock.patch('functest_kubernetes.k8stest.os.path.isfile')
@mock.patch('functest_kubernetes.k8stest.subprocess.Popen')
def test_run(self, mock_open, mock_isfile):