Commit Graph

50 Commits

Author SHA1 Message Date
Patrick Ohly
2f6c4f5eab e2e: use Ginkgo context
All code must use the context from Ginkgo when doing API calls or polling for a
change, otherwise the code would not return immediately when the test gets
aborted.
2022-12-16 20:14:04 +01:00
Patrick Ohly
df5d84ae81 e2e: accept context from Ginkgo
Every ginkgo callback should return immediately when a timeout occurs or the
test run manually gets aborted with CTRL-C. To do that, they must take a ctx
parameter and pass it through to all code which might block.

This is a first automated step towards that: the additional parameter got added
with

    sed -i 's/\(framework.ConformanceIt\|ginkgo.It\)\(.*\)func() {$/\1\2func(ctx context.Context) {/' \
        $(git grep -l -e framework.ConformanceIt -e ginkgo.It )
    $GOPATH/bin/goimports -w $(git status | grep modified: | sed -e 's/.* //')

log_test.go was left unchanged.
2022-12-10 19:50:18 +01:00
Dave Chen
857458cfa5 update ginkgo from v1 to v2 and gomega to 1.19.0
- update all the import statements
- run hack/pin-dependency.sh to change pinned dependency versions
- run hack/update-vendor.sh to update go.mod files and the vendor directory
- update the method signatures for custom reporters

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-08 10:44:46 +08:00
Sergiusz Urbaniak
373c08e0c7
test/e2e/framework: configure pod security admission level for e2e tests 2022-03-28 15:42:10 +02:00
drfish
dfab6b637f Update .import-aliases for e2e test framework 2020-03-25 11:40:02 +08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Jan Safranek
528adbefe4 Remove client cleanup from TestCleanup
All tests remove the test client pod, usually in TestVolumeClient.
Rename TestCleanup to TestServerCleanup.
In addition, remove few calls to Test(Server)Cleanup that do not do anything
useful (server pod is not used in these tests).
2020-02-13 09:55:53 +01:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Olev Kartau
4f75ed2a94 Removed 2nd arg "cs" from TestVolumeClient
as we assume it is always set to f.ClientSet and we can
use its value from passed framework argument.
2019-11-12 14:42:24 +02:00
Olev Kartau
2fac3f2c20 test/e2e: Reduce need to use local kubectl
Use POST method instead of running local kubectl.
Use ExecCommandInContainerWithFullOutput() instead of RunKubectl().
PodExec() takes additional framework arg, passed down in call chain.
VerifyExecInPodFail uses different error code cast as original
one causes test code Panic if used with new call method.
2019-11-12 14:42:24 +02:00
carlory
910bd000ff use log functions of core framework in the 'test/e2e/storage/*' 2019-09-06 10:26:16 +08:00
SataQiu
332be4b1e3 refactor: replace framework.Failf with e2elog.Failf 2019-06-19 17:52:35 +08:00
SataQiu
01d38fec16 fix golint failures of test/e2e/storage 2019-05-11 23:30:17 +08:00
danielqsj
1058877fbf remove dot imports in e2e/storage 2019-05-10 13:56:26 +08:00
SataQiu
252cabf155 [e2e] test/e2e/framework/volume_util.go -> test/e2e/framework/volume/fixtures.go 2019-04-13 16:58:37 +08:00
Masaki Kimura
b767dbdeb5 Fix volumes e2e test to check fsType 2019-01-23 05:12:37 +00:00
Masaki Kimura
877ed5c22d Refactor volume test in a similar way to csi tests
Refactoring for non-csi e2e test similar to below commit in csi e2e test.
4d11dab272 (diff-0d9ecaa3e6a0297186ad33f57aad472e)

Scopes for this refactoring are below four files:
  - test/e2e/storage/volumes.go
  - test/e2e/storage/volume_io.go
  - test/e2e/storage/persistent_volumes-volumemode.go
  - test/e2e/storage/subpath.go

fixes: #66571
2018-08-29 14:39:01 +00:00
Yang Guo
7a0c1ab322 Allow running various storage e2e tests on custom images 2018-08-09 17:02:02 -07:00
Jan Safranek
e483efd0ac Remove Feature:Volume from tests
These tests don't depend on any alpha/beta feature and they have correct
Skip tests so they run only on proper cloud.
2018-06-05 15:39:32 +02:00
Jan Safranek
5a099d70c9 Move Ceph server secret creation to common code. 2018-05-25 14:02:59 +02:00
Jan Safranek
f0fc0e1555 Add pod cleanup timeout
After client pod is stopped we need to wait for a while for kubelet to
unmount and clean up the client pod before we can destroy the server pod.

Killing e.g. iSCSI server too early may result in stale attached device
that cannot be removed.
2018-03-06 10:04:49 +01:00
Jan Safranek
9db147715b Fix Ceph RBD image
- create 120MB volume instead of 1MB for volume_io tests
- rebase to Fedora 26
- added compatibility with ext4 and older ceph clients
- unify CephFS and Ceph RBD images.
2018-03-06 10:04:48 +01:00
Divyen Patel
8823c229d5 Addressed review comments 2018-02-13 16:59:46 -08:00
Divyen Patel
c0490fa623 removing production code usage from e2e tests code 2018-02-13 10:41:16 -08:00
Kubernetes Submit Queue
c0c6b082b8
Merge pull request #54230 from jsafrane/ceph-test-sleep
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow Ceph server some time to start

Ceph server needs to create our "foo" volume on startup. It keeps the image small, however it makes the server container start slow.

Add sleep before the server is usable. Without this PR, all pods that use Ceph fail to start for couple of seconds with cryptic "image foo not found" error and it clutters logs and pod logs and makes it harder to spot real errors.

```release-note
NONE
```

/sig storage
/sig testing
/assign @jeffvance @copejon
2018-01-10 13:19:33 -08:00
liz
b814c5677f
Collect all the assorted image URLs from e2e tests in one place
utils/image/manifest has an additional `arch` parameter, which determines
whether an image ends in `-$ARCH` (like `-amd64`).

All locations that previously had gcr.io urls referenced in costants or inline
have been updated to refere test/utils/image.
2017-12-19 12:16:07 -05:00
Rohit Jog
015e20cb15 e2e test layout changes for vsphere (#398) 2017-12-18 10:19:18 -08:00
rohitjogvmw
79e1da68d2 Updating vSphere Cloud Provider (VCP) to support k8s cluster spead across multiple ESXi clusters, datacenters or even vSphere vCenters
- vsphere.conf (cloud-config) is now needed only on master node
   - VCP uses OS hostname and not vSphere inventory name
   - VCP is now resilient to VM inventory name change and VM migration
2017-11-17 14:49:32 -08:00
jianglingxia
342d03c0fe remove the clean entirely and defer func format 2017-10-26 12:31:39 +08:00
jianglingxia
a4ce39248a Delete the parentheses in volumes.go 2017-10-25 16:51:56 +08:00
Jan Safranek
75cc26fb65 Allow Ceph server some time to start
Ceph server needs to create our "foo" volume on startup. It keeps the image
small, however it makes the server container start slow.

Add sleep before the server is usable. Without this PR, all pods that use Ceph
fail to start for couple of seconds with cryptic "image foo not found" error
and it clutters logs and pod logs and makes it harder to spot real errors.
2017-10-19 14:29:58 +02:00
Kevin
f76ca1fb16 update clientset.Core() to clientset.CoreV1() in test 2017-08-14 16:53:55 +08:00
Maciej Borsz
6d789ee640 Fix storage tests for multizone test configuration. 2017-08-07 12:15:14 +02:00
Kubernetes Submit Queue
b8760758f8 Merge pull request #49507 from msau42/ubuntu-e2e
Automatic merge from submit-queue

Add ubuntu to gluster and nfs tests

**What this PR does / why we need it**:
Enable gluster and nfs tests for ubuntu distro

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50039


**Special notes for your reviewer**:

**Release note**:

/release-note-none
/sig storage
2017-08-02 14:31:20 -07:00
Michelle Au
20c7040c21 Add ext4 and xfs tests to GCE PD basic mount tests 2017-07-25 14:06:28 -07:00
Michelle Au
1591ef9895 Add ubuntu to gluster and nfs tests 2017-07-24 11:00:09 -07:00
Michelle Au
e53ba82702 Cleanup storage e2e test names by removing redundant [sig-storage] tags and [Volume] tags 2017-07-20 11:11:40 -07:00
jeff vance
a113d8ac41 volume i/o tests for storage plugins 2017-07-18 17:59:15 -07:00
Jacob Simpson
29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Ryan Hitchman
678ca905d6 Remove volume tags. 2017-07-12 11:11:16 -07:00
Ryan Hitchman
d4dc49ba90 Make storage e2e tests start with [sig-storage] instead of [k8s.io].
This makes understanding sig ownership from a test name very easy for
tools and humans.
2017-07-12 11:11:16 -07:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
mbohlool
c91a12d205 Remove all references to types.UnixUserID and types.UnixGroupID 2017-06-21 04:09:07 -07:00
Jamie Hannaford
9440a68744 Use dedicated Unix User and Group ID types 2017-05-05 14:07:38 +02:00
Huamin Chen
165d46a0a8 e2e test: test azure disk volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-04-28 18:51:34 +00:00
Jon Cope
da2b33de0e De-flake Volume GCEPD test.
Force detach of PD prior to deletion.
2017-04-19 07:27:05 -05:00
Jeff Vance
0d81e4c87c improve error handling in e2e helpers by always returning error 2017-04-14 14:18:55 -07:00
Timothy St. Clair
203c0df017 Segregate storage e2es for easier assignment.
Further work is needed to isolate dependencies on shared tooling.
2017-04-12 20:39:29 -05:00