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

Test framework POC #49

Closed
leakingtapan opened this issue Aug 16, 2019 · 0 comments · Fixed by #54
Closed

Test framework POC #49

leakingtapan opened this issue Aug 16, 2019 · 0 comments · Fixed by #54

Comments

@leakingtapan
Copy link
Contributor

leakingtapan commented Aug 16, 2019

Overview

We are going to have a POC by rewriting the EBS CSI driver's run-e2e-test script. And use it for FSx CSI driver to test out its usability.

Design

The framework will implement the same logic as implemented in the run-e2e-test script. And it will be configurable to be consumed by different projects. Assume running the test as the project root. The configured will be exposed through a configuration file:

k8s-test-config.yaml:

cluster:
  aws:
    region: us-west-2
    nodeCount: 3
    nodeSize: c5.large
    kubernetesVersion: 1.14
    kubeAPIServer:
      featureGates:
        CSIDriverRegistry: "true"
        CSINodeInfo: "true"
        CSIBlockVolume: "true"
        VolumeSnapshotDataSource: "true"
    kubelet:
      featureGates:
        CSIDriverRegistry: "true"
        CSINodeInfo: "true"
        CSIBlockVolume: "true"
build: |
  AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
  IMAGE_TAG=$TEST_ID
  IMAGE_NAME=$AWS_ACCOUNT_ID.dkr.ecr.$REGION.amazonaws.com/aws-ebs-csi-driver
  docker build -t $IMAGE_NAME:$IMAGE_TAG .

install: |
  echo "Deploying driver"
  source $(dirname "${BASH_SOURCE}")/utils/helm.sh
  helm::install
  helm::init
  helm::wait_tiller
  helm install --name aws-ebs-csi-driver \
      --set enableVolumeScheduling=true \
      --set enableVolumeResizing=true \
      --set enableVolumeSnapshot=true \
      --set image.repository=$IMAGE_NAME \
      --set image.tag=$IMAGE_TAG \
      ./aws-ebs-csi-driver

uninstall: | 
  echo "Removing driver"
  helm del --purge aws-ebs-csi-driver

test: |
  go get -u github.com/onsi/ginkgo/ginkgo
  export KUBECONFIG=$HOME/.kube/config
  ginkgo -p -nodes=$NODES -v --focus="$FOCUS" tests/e2e -- -report-dir=$ARTIFACTS

/cc @wongma7

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant