docker_driver_integration_tests

package module
v0.0.0-...-215890c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

Diego Volume Driver Integration Tests

These tests are used to test volume drivers against the Diego volume manager (aka volman).

Installation

Prereqs:

Running locally

go run github.com/onsi/ginkgo/v2/ginkgo -r

Configuration

  • Make sure that your driver is running (you can see the start/stop scripts in example.
  • Create a fixture file that contains connection information for your driver
{
  "volman_driver_path": "~/voldriver_plugins",
  "driver_address": "http://127.0.0.1:9786",
  "driver_name": "fakedriver",
  "create_config": {
    "Name": "fake-volume",
    "Opts": {"volume_id":"fake-volume"}
  }
}

NB: Optionally, you can supply a TLS Config as follows:-

{
  "volman_driver_path": "~/voldriver_plugins",
  ...
  "tls_config": {
    "InsecureSkipVerify": true,
    "CAFile": "localdriver_ca.crt",
    "CertFile":"localdriver_client.crt",
    "KeyFile":"localdriver_client.key"
  }
}

Note: to run tests, you'll need to be in a containing project or GOPATH (eg. diego_release).

Running example SMB compatibility

TEST_PACKAGE=docker_driver_integration_tests/compatibility \
fly -t persi execute \
-c /Users/pivotal/workspace/smb-volume-release/scripts/ci/run_docker_driver_integration_tests.build.yml \
-j persi/smbdriver-integration \
-i smb-volume-release-concourse-tasks=/Users/pivotal/workspace/smb-volume-release \
-i docker_driver_integration_tests=/Users/pivotal/go/src/code.cloudfoundry.org/docker_driver_integration_tests \
-i smb-volume-release=/Users/pivotal/workspace/smb-volume-release \
 --privileged

Running example SMB

TEST_PACKAGE=docker_driver_integration_tests \
fly -t persi execute \
-c /Users/pivotal/workspace/smb-volume-release/scripts/ci/run_docker_driver_integration_tests.build.yml \
-j persi/smbdriver-integration \
-i smb-volume-release-concourse-tasks=/Users/pivotal/workspace/smb-volume-release \
-i docker_driver_integration_tests=/Users/pivotal/go/src/code.cloudfoundry.org/docker_driver_integration_tests \
-i smb-volume-release=/Users/pivotal/workspace/smb-volume-release \
 --privileged

Running example SMB with lazy_unmount

TEST_PACKAGE=docker_driver_integration_tests/lazy_unmount \
fly -t persi execute \
-c /Users/pivotal/workspace/smb-volume-release/scripts/ci/run_docker_driver_integration_tests.build.yml \
-j persi/smbdriver-integration \
-i smb-volume-release-concourse-tasks=/Users/pivotal/workspace/smb-volume-release \
-i docker_driver_integration_tests=/Users/pivotal/go/src/code.cloudfoundry.org/docker_driver_integration_tests \
-i smb-volume-release=/Users/pivotal/workspace/smb-volume-release \
 --privileged

Running example NFS

TEST_PACKAGE=docker_driver_integration_tests/ fly -t persi execute \
-c /Users/pivotal/workspace/nfs-volume-release/scripts/ci/run_docker_driver_integration_tests.build.yml \
-j persi/nfsdriver-integration \
-i nfs-volume-release-concourse-tasks=/Users/pivotal/workspace/nfs-volume-release \
-i docker_driver_integration_tests=/Users/pivotal/go/src/code.cloudfoundry.org/docker_driver_integration_tests \
-i nfs-volume-release=/Users/pivotal/workspace/nfs-volume-release \
-i mapfs-release=/Users/pivotal/workspace/mapfs-release \
 --privileged

Running example NFS lazy unmount

TEST_PACKAGE=docker_driver_integration_tests/lazy_unmount fly -t persi execute \
-c $HOME/workspace/nfsv3driver/scripts/ci/run_docker_driver_integration_tests.build.yml \
-j nfs-driver/integration \
-i docker_driver_integration_tests=$HOME/workspace/docker_driver_integration_tests \
-i nfsv3driver=$HOME/workspace/nfsv3driver \
-i mapfs=$HOME/workspace/mapfs \
 --privileged

Running example NFS compatibility

TEST_PACKAGE=docker_driver_integration_tests/compatibility fly -t persi execute \
-c $HOME/workspace/nfsv3driver/scripts/ci/run_docker_driver_integration_tests.build.yml \
-j nfs-driver/integration \
-i docker_driver_integration_tests=$HOME/workspace/docker_driver_integration_tests \
-i nfsv3driver=$HOME/workspace/nfsv3driver \
-i mapfs=$HOME/workspace/mapfs \
 --privileged

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveCertificationFixture

func SaveCertificationFixture(fixture CertificationFixture, fileName string) error

Types

type CertificationFixture

type CertificationFixture struct {
	VolmanDriverPath string                     `json:"volman_driver_path"`
	DriverAddress    string                     `json:"driver_address"`
	DriverName       string                     `json:"driver_name"`
	CreateConfig     dockerdriver.CreateRequest `json:"create_config"`
	TLSConfig        *dockerdriver.TLSConfig    `json:"tls_config,omitempty"`
}

func LoadCertificationFixture

func LoadCertificationFixture(fileName string) (CertificationFixture, error)

func LoadFixtureTemplate

func LoadFixtureTemplate() CertificationFixture

func (*CertificationFixture) CreateVolmanRunner

func (cf *CertificationFixture) CreateVolmanRunner(volmanPath string) ifrit.Runner

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL