mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-02-05 13:25:19 +02:00
Provide foundation for integration-like tests (#1131)
This commit is contained in:
parent
a5d4c64bf4
commit
e81f40f645
@ -16,6 +16,7 @@ plugins:
|
||||
exclude_patterns:
|
||||
- "documentation/**/images/"
|
||||
- "cfg/id_rsa.enc"
|
||||
- "**/testdata/**"
|
||||
fixme:
|
||||
enabled: true
|
||||
config:
|
||||
|
16
.github/workflows/verify-go.yml
vendored
16
.github/workflows/verify-go.yml
vendored
@ -55,3 +55,19 @@ jobs:
|
||||
run: go mod tidy
|
||||
- name: verify
|
||||
run: git diff --name-only --exit-code
|
||||
integration:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: '1.13.x'
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: build
|
||||
run: CGO_ENABLED=0 go build -o piper && chmod +x piper
|
||||
- name: test
|
||||
env:
|
||||
PIPER_INTEGRATION_GITHUB_TOKEN: ${{secrets.PIPER_INTEGRATION_GITHUB_TOKEN}}
|
||||
run: |
|
||||
export PATH=$PATH:$(pwd)
|
||||
go test -tags=integration ./integration/...
|
||||
|
4
go.mod
4
go.mod
@ -11,11 +11,13 @@ require (
|
||||
github.com/google/go-cmp v0.3.1
|
||||
github.com/google/go-containerregistry v0.0.0-20200131185320-aec8da010de2
|
||||
github.com/google/go-github/v28 v28.1.1
|
||||
github.com/pkg/errors v0.8.1
|
||||
github.com/google/uuid v1.1.1
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/sirupsen/logrus v1.4.2
|
||||
github.com/spf13/cobra v0.0.5
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/stretchr/testify v1.4.0
|
||||
github.com/testcontainers/testcontainers-go v0.1.0
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
|
||||
)
|
||||
|
48
go.sum
48
go.sum
@ -20,15 +20,16 @@ github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsI
|
||||
github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8=
|
||||
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
|
||||
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14=
|
||||
github.com/GoogleContainerTools/container-diff v0.15.0 h1:fyYoSoJuefWUhVLNAfnSacs/4WWCUR4+2JkiU9xzqOY=
|
||||
github.com/GoogleContainerTools/container-diff v0.15.0/go.mod h1:tJLKT7P37rapR5AYos9z/zkajzfShGULJtUr2rGHGKY=
|
||||
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
||||
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
|
||||
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA=
|
||||
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
|
||||
github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
|
||||
github.com/Microsoft/hcsshim v0.8.7 h1:ptnOoufxGSzauVTsdE+wMYnCWA301PdoN4xg5oRdZpg=
|
||||
github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
@ -48,6 +49,8 @@ github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb
|
||||
github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
|
||||
github.com/bmatcuk/doublestar v1.2.2 h1:oC24CykoSAB8zd7XgruHo33E0cHJf/WhQA/7BeXj+x0=
|
||||
github.com/bmatcuk/doublestar v1.2.2/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
|
||||
@ -80,9 +83,11 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
|
||||
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
|
||||
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017 h1:2HQmlpI3yI9deH18Q6xiSOIjXD4sLI55Y/gfpa8/558=
|
||||
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
|
||||
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker v0.7.3-0.20190506211059-b20a14b54661/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker v1.4.2-0.20200114201811-16a3519d870b h1:CrNyKukWIBVy2bR9+Mff24Yc85oD8LUwW4f81kjSvFw=
|
||||
github.com/docker/docker v1.4.2-0.20200114201811-16a3519d870b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
@ -90,6 +95,7 @@ github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGl
|
||||
github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
|
||||
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
|
||||
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
||||
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
|
||||
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
|
||||
@ -100,6 +106,7 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb
|
||||
github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||
github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
@ -118,9 +125,14 @@ github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8
|
||||
github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
|
||||
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-redis/redis v6.15.7+incompatible h1:3skhDh95XQMpnqeqNftPkQD9jL9e5e36z/1SUm6dy1U=
|
||||
github.com/go-redis/redis v6.15.7+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
||||
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
|
||||
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I=
|
||||
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
@ -130,7 +142,6 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
|
||||
@ -153,11 +164,14 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/googleapis/gnostic v0.2.2/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
|
||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=
|
||||
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
@ -172,6 +186,7 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
||||
@ -188,7 +203,6 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
@ -199,7 +213,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
@ -210,7 +223,6 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY=
|
||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
@ -218,6 +230,7 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ
|
||||
github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
@ -228,9 +241,11 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v
|
||||
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo=
|
||||
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
|
||||
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
|
||||
github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ=
|
||||
@ -238,13 +253,16 @@ github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQ
|
||||
github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
|
||||
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
|
||||
github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
||||
github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y=
|
||||
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
||||
github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||
github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
@ -262,6 +280,7 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
@ -286,12 +305,13 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||
github.com/testcontainers/testcontainers-go v0.1.0 h1:R7CZ/dgrendXg5T+gPffAZ2sRQq38kqdPelICJshXLo=
|
||||
github.com/testcontainers/testcontainers-go v0.1.0/go.mod h1:5aBi+1PJmFixVc3b349A7NrhyTRYkMDpZEtT5MFxCs8=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
@ -313,12 +333,10 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g=
|
||||
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
@ -343,7 +361,6 @@ golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73r
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
@ -372,11 +389,11 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -397,6 +414,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180810170437-e96c4e24768d/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@ -422,7 +441,6 @@ gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmK
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c=
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
@ -432,6 +450,7 @@ google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRn
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 h1:nfPFGzJkUDX6uBmpN/pSw7MbOAWegH5QDQuoXFHedLg=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
@ -444,22 +463,25 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogR
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/warnings.v0 v0.1.1/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gotest.tools v0.0.0-20181223230014-1083505acf35/go.mod h1:R//lfYlUuTOTfblYI3lGoAAAebUdzjvbmQsuB7Ykd90=
|
||||
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
|
||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
|
75
integration/contracts_test.go
Normal file
75
integration/contracts_test.go
Normal file
@ -0,0 +1,75 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/SAP/jenkins-library/pkg/generator/helper"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCommandContract(t *testing.T) {
|
||||
assert.Equal(t, "", "")
|
||||
}
|
||||
|
||||
// Test provided by consumer: SAP InnerSource project
|
||||
// Changes to the test require peer review by core-team members involved in the project.
|
||||
func TestGenerator(t *testing.T) {
|
||||
dir, err := ioutil.TempDir("", "")
|
||||
defer os.RemoveAll(dir) // clean up
|
||||
assert.NoError(t, err, "Error when creating temp dir")
|
||||
|
||||
metadata := `metadata:
|
||||
name: test
|
||||
description: testDescription
|
||||
longDescription: testLongDescription
|
||||
spec:
|
||||
inputs:
|
||||
secrets:
|
||||
- name: secret
|
||||
description: secretDescription
|
||||
type: jenkins
|
||||
params:
|
||||
- name: testParam
|
||||
aliases:
|
||||
- name: testAlias
|
||||
type: string
|
||||
description: The name of the Checkmarx project to scan into
|
||||
mandatory: true
|
||||
scope:
|
||||
- PARAMETERS
|
||||
- STAGES
|
||||
- STEPS
|
||||
resourceRef:
|
||||
- name: commonPipelineEnvironment
|
||||
param: test/test
|
||||
outputs:
|
||||
resources:
|
||||
- name: influx
|
||||
type: influx
|
||||
params:
|
||||
- name: test_influx
|
||||
fields:
|
||||
- name: testfield
|
||||
- name: commonPipelineEnvironment
|
||||
type: piperEnvironment
|
||||
params:
|
||||
- name: test_cpe
|
||||
`
|
||||
|
||||
ioutil.WriteFile(filepath.Join(dir, "test.yaml"), []byte(metadata), 0755)
|
||||
|
||||
openMetaFile := func(name string) (io.ReadCloser, error) { return os.Open(name) }
|
||||
fileWriter := func(filename string, data []byte, perm os.FileMode) error { return nil }
|
||||
|
||||
stepHelperData := helper.StepHelperData{openMetaFile, fileWriter, "piperOsCmd"}
|
||||
docuHelperData := helper.DocuHelperData{false, "", nil, nil}
|
||||
|
||||
metadataFiles, err := helper.MetadataFiles(dir)
|
||||
assert.NoError(t, err)
|
||||
|
||||
err = helper.ProcessMetaFiles(metadataFiles, stepHelperData, docuHelperData)
|
||||
assert.NoError(t, err)
|
||||
}
|
49
integration/integration_api_cli_test.go
Normal file
49
integration/integration_api_cli_test.go
Normal file
@ -0,0 +1,49 @@
|
||||
// +build integration
|
||||
// can be execute with go test -tags=integration ./integration/...
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/testcontainers/testcontainers-go"
|
||||
)
|
||||
|
||||
func TestDummy(t *testing.T) {
|
||||
|
||||
t.Skip("Skipping testing - this is just to show how it can be done")
|
||||
ctx := context.Background()
|
||||
|
||||
dir, err := os.Getwd()
|
||||
assert.NoError(t, err, "Getting current working directory failed.")
|
||||
dir = filepath.Dir(dir)
|
||||
|
||||
req := testcontainers.ContainerRequest{
|
||||
Image: "node:lts-stretch",
|
||||
Cmd: []string{"tail", "-f"},
|
||||
BindMounts: map[string]string{dir: "/data"},
|
||||
//ToDo: we may set up a tmp directory and mount it in addition, e.g. for runtime artifacts ...
|
||||
}
|
||||
|
||||
testContainer, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
|
||||
ContainerRequest: req,
|
||||
Started: true,
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
|
||||
piperOptions := []string{
|
||||
"<piperStep>",
|
||||
"-- <piperFlag1>",
|
||||
"<piperFlag1Value>",
|
||||
"...",
|
||||
"--noTelemetry",
|
||||
}
|
||||
|
||||
code, err := testContainer.Exec(ctx, append([]string{"/data/piper"}, piperOptions...))
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 0, code)
|
||||
}
|
58
integration/integration_api_test.go
Normal file
58
integration/integration_api_test.go
Normal file
@ -0,0 +1,58 @@
|
||||
// +build integration
|
||||
// can be execute with go test -tags=integration ./integration/...
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/SAP/jenkins-library/pkg/command"
|
||||
"github.com/SAP/jenkins-library/pkg/piperenv"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPiperGithubPublishRelease(t *testing.T) {
|
||||
t.Parallel()
|
||||
token := os.Getenv("PIPER_INTEGRATION_GITHUB_TOKEN")
|
||||
if len(token) == 0 {
|
||||
t.Fatal("No GitHub token maintained")
|
||||
}
|
||||
|
||||
owner := os.Getenv("PIPER_INTEGRATION_GITHUB_OWNER")
|
||||
if len(owner) == 0 {
|
||||
owner = "OliverNocon"
|
||||
}
|
||||
repository := os.Getenv("PIPER_INTEGRATION_GITHUB_REPOSITORY")
|
||||
if len(repository) == 0 {
|
||||
repository = "piper-integration"
|
||||
}
|
||||
|
||||
dir, err := ioutil.TempDir("", "")
|
||||
defer os.RemoveAll(dir) // clean up
|
||||
assert.NoError(t, err, "Error when creating temp dir")
|
||||
|
||||
//prepare pipeline environment
|
||||
now := time.Now()
|
||||
piperenv.SetResourceParameter(filepath.Join(dir, ".pipeline"), "commonPipelineEnvironment", "artifactVersion", now.Format("20060102150405"))
|
||||
|
||||
cmd := command.Command{}
|
||||
cmd.Dir(dir)
|
||||
|
||||
piperOptions := []string{
|
||||
"githubPublishRelease",
|
||||
"--owner",
|
||||
owner,
|
||||
"--repository",
|
||||
repository,
|
||||
"--token",
|
||||
token,
|
||||
"--noTelemetry",
|
||||
}
|
||||
|
||||
err = cmd.RunExecutable(getPiperExecutable(), piperOptions...)
|
||||
assert.NoError(t, err, "Calling piper with arguments %v failed.", piperOptions)
|
||||
}
|
176
integration/integration_cli_test.go
Normal file
176
integration/integration_cli_test.go
Normal file
@ -0,0 +1,176 @@
|
||||
// +build integration
|
||||
// can be execute with go test -tags=integration ./integration/...
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/testcontainers/testcontainers-go"
|
||||
)
|
||||
|
||||
func TestKarmaIntegration(t *testing.T) {
|
||||
|
||||
t.Parallel()
|
||||
ctx := context.Background()
|
||||
|
||||
pwd, err := os.Getwd()
|
||||
assert.NoError(t, err, "Getting current working directory failed.")
|
||||
pwd = filepath.Dir(pwd)
|
||||
|
||||
// using custom createTmpDir function to avoid issues with symlinks on Docker for Mac
|
||||
tempDir, err := createTmpDir("")
|
||||
defer os.RemoveAll(tempDir) // clean up
|
||||
assert.NoError(t, err, "Error when creating temp dir")
|
||||
|
||||
err = copyDir(filepath.Join(pwd, "integration", "testdata", t.Name()), tempDir)
|
||||
if err != nil {
|
||||
t.Fatal("Failed to copy test project.")
|
||||
}
|
||||
|
||||
//workaround to use test script util it is possible to set workdir for Exec call
|
||||
testScript := `#!/bin/sh
|
||||
cd /test
|
||||
/piperbin/piper karmaExecuteTests
|
||||
`
|
||||
ioutil.WriteFile(filepath.Join(tempDir, "runPiper.sh"), []byte(testScript), 0700)
|
||||
|
||||
networkName := "sidecar-" + uuid.New().String()
|
||||
|
||||
reqNode := testcontainers.ContainerRequest{
|
||||
Image: "node:lts-stretch",
|
||||
Cmd: []string{"tail", "-f"},
|
||||
BindMounts: map[string]string{
|
||||
pwd: "/piperbin",
|
||||
tempDir: "/test",
|
||||
},
|
||||
Networks: []string{networkName},
|
||||
NetworkAliases: map[string][]string{networkName: []string{"karma"}},
|
||||
}
|
||||
|
||||
reqSel := testcontainers.ContainerRequest{
|
||||
Image: "selenium/standalone-chrome",
|
||||
Networks: []string{networkName},
|
||||
NetworkAliases: map[string][]string{networkName: []string{"selenium"}},
|
||||
}
|
||||
|
||||
provider, err := testcontainers.ProviderDocker.GetProvider()
|
||||
assert.NoError(t, err)
|
||||
|
||||
network, err := provider.CreateNetwork(ctx, testcontainers.NetworkRequest{Name: networkName, CheckDuplicate: true})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer network.Remove(ctx)
|
||||
|
||||
nodeContainer, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
|
||||
ContainerRequest: reqNode,
|
||||
Started: true,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer nodeContainer.Terminate(ctx)
|
||||
|
||||
selContainer, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
|
||||
ContainerRequest: reqSel,
|
||||
Started: true,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer selContainer.Terminate(ctx)
|
||||
|
||||
// cannot use piper command directly since it is not possible to set Workdir for Exec call
|
||||
// workaround use shell call in container (see above)
|
||||
//piperOptions := []string{
|
||||
// "karmaExecuteTests",
|
||||
// "--help",
|
||||
//}
|
||||
//code, err := nodeContainer.Exec(ctx, append([]string{"/data/piper"}, piperOptions...))
|
||||
|
||||
code, err := nodeContainer.Exec(ctx, []string{"sh", "/test/runPiper.sh"})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 0, code)
|
||||
}
|
||||
|
||||
// Dir copies a directory
|
||||
func copyDir(source string, target string) error {
|
||||
var err error
|
||||
var fileInfo []os.FileInfo
|
||||
var sourceInfo os.FileInfo
|
||||
|
||||
if sourceInfo, err = os.Stat(source); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = os.MkdirAll(target, sourceInfo.Mode()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if fileInfo, err = ioutil.ReadDir(source); err != nil {
|
||||
return err
|
||||
}
|
||||
for _, info := range fileInfo {
|
||||
sourcePath := path.Join(source, info.Name())
|
||||
targetPath := path.Join(target, info.Name())
|
||||
|
||||
if info.IsDir() {
|
||||
if err = copyDir(sourcePath, targetPath); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if err = copyFile(sourcePath, targetPath); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func copyFile(source, target string) error {
|
||||
var err error
|
||||
var sourceFile *os.File
|
||||
var targetFile *os.File
|
||||
var sourceInfo os.FileInfo
|
||||
|
||||
if sourceFile, err = os.Open(source); err != nil {
|
||||
return err
|
||||
}
|
||||
defer sourceFile.Close()
|
||||
|
||||
if targetFile, err = os.Create(target); err != nil {
|
||||
return err
|
||||
}
|
||||
defer targetFile.Close()
|
||||
|
||||
if _, err = io.Copy(targetFile, sourceFile); err != nil {
|
||||
return err
|
||||
}
|
||||
if sourceInfo, err = os.Stat(source); err != nil {
|
||||
return err
|
||||
}
|
||||
return os.Chmod(target, sourceInfo.Mode())
|
||||
}
|
||||
|
||||
func createTmpDir(prefix string) (string, error) {
|
||||
dirName := os.TempDir()
|
||||
tmpDir, err := filepath.EvalSymlinks(dirName)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
tmpDir = filepath.Clean(tmpDir)
|
||||
path, err := ioutil.TempDir(tmpDir, prefix)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return path, nil
|
||||
}
|
33
integration/integration_test.go
Normal file
33
integration/integration_test.go
Normal file
@ -0,0 +1,33 @@
|
||||
// +build integration
|
||||
// can be execute with go test -tags=integration ./integration/...
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/SAP/jenkins-library/pkg/command"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPiperHelp(t *testing.T) {
|
||||
t.Parallel()
|
||||
piperHelpCmd := command.Command{}
|
||||
|
||||
var commandOutput bytes.Buffer
|
||||
piperHelpCmd.Stdout(&commandOutput)
|
||||
|
||||
err := piperHelpCmd.RunExecutable(getPiperExecutable(), "--help")
|
||||
|
||||
assert.NoError(t, err, "Calling piper --help failed")
|
||||
assert.Contains(t, commandOutput.String(), "Use \"piper [command] --help\" for more information about a command.")
|
||||
}
|
||||
|
||||
func getPiperExecutable() string {
|
||||
if p := os.Getenv("PIPER_INTEGRATION_EXECUTABLE"); len(p) > 0 {
|
||||
return p
|
||||
}
|
||||
return "piper"
|
||||
}
|
55
integration/testdata/TestKarmaIntegration/karma.conf.js
vendored
Normal file
55
integration/testdata/TestKarmaIntegration/karma.conf.js
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
// karma.conf.js
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath : "./",
|
||||
frameworks : [ "qunit", "openui5" ],
|
||||
files : [
|
||||
{
|
||||
pattern : "src/frontend/test/karma-qunit.js", included: true
|
||||
},
|
||||
{
|
||||
pattern : "src/frontend/test/integration/AllJourneys.js", included: true
|
||||
},
|
||||
{
|
||||
pattern : "src/frontend/**/*", included : false
|
||||
}
|
||||
],
|
||||
browsers: ['chrome_selenium'],
|
||||
|
||||
hostname: 'karma',
|
||||
customLaunchers: {
|
||||
chrome_selenium: {
|
||||
base: 'WebDriver',
|
||||
config: {
|
||||
hostname: 'selenium',
|
||||
port: 4444
|
||||
},
|
||||
browserName: 'chrome',
|
||||
name: 'Chrome'
|
||||
},
|
||||
},
|
||||
port : 9876,
|
||||
logLevel : "DEBUG",
|
||||
autoWatch : false,
|
||||
singleRun : true,
|
||||
browserNoActivityTimeout : 40000,
|
||||
browserDisconnectTolerance: 2,
|
||||
|
||||
openui5 : {
|
||||
path : "https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
|
||||
},
|
||||
client: {
|
||||
openui5 : {
|
||||
config : {
|
||||
theme : "sap_bluecrystal",
|
||||
resourceroots : {
|
||||
'sap.ui.piper.test': '/base/src/frontend/test',
|
||||
'sap.ui.piper.controller': '/base/src/frontend/controller',
|
||||
'sap.ui.piper': '/base/src/frontend'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
22
integration/testdata/TestKarmaIntegration/package.json
vendored
Normal file
22
integration/testdata/TestKarmaIntegration/package.json
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "piper-karma-integration",
|
||||
"version": "1.0.1",
|
||||
"private": false,
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "",
|
||||
"main": "app.js",
|
||||
"repository": {
|
||||
"type": "git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"karma": "^1.4.0",
|
||||
"karma-openui5": "^0.2.1",
|
||||
"karma-qunit": "^1.2.1",
|
||||
"karma-webdriver-launcher": "^1.0.5",
|
||||
"qunitjs": "^1.22.0"
|
||||
},
|
||||
"scripts": {
|
||||
"karma": "./node_modules/.bin/karma start"
|
||||
}
|
||||
}
|
16
integration/testdata/TestKarmaIntegration/src/frontend/Component.js
vendored
Normal file
16
integration/testdata/TestKarmaIntegration/src/frontend/Component.js
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
sap.ui.define([
|
||||
'sap/ui/core/UIComponent',
|
||||
'sap/ui/model/json/JSONModel',
|
||||
'sap/ui/model/resource/ResourceModel'
|
||||
], function (UIComponent, JSONModel, ResourceModel) {
|
||||
'use strict';
|
||||
return UIComponent.extend('sap.ui.piper.Component', {
|
||||
metadata : {
|
||||
rootView: 'sap.ui.piper.view.App'
|
||||
},
|
||||
init : function () {
|
||||
// call the init function of the parent
|
||||
UIComponent.prototype.init.apply(this, arguments);
|
||||
}
|
||||
});
|
||||
});
|
37
integration/testdata/TestKarmaIntegration/src/frontend/controller/App.controller.js
vendored
Normal file
37
integration/testdata/TestKarmaIntegration/src/frontend/controller/App.controller.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
sap.ui.define([
|
||||
'sap/ui/core/mvc/Controller',
|
||||
'sap/m/MessageToast',
|
||||
'sap/ui/model/json/JSONModel'
|
||||
], function (Controller, Toast, JSONModel) {
|
||||
'use strict';
|
||||
return Controller.extend('sap.ui.piper.controller.App', {
|
||||
|
||||
onShowToast() {
|
||||
Toast.show('Opened Toast Message');
|
||||
},
|
||||
|
||||
onShowDialog() {
|
||||
var oView = this.getView();
|
||||
var oDialog = oView.byId('demoDialog');
|
||||
// create dialog it doesn't already exist
|
||||
if (!oDialog) {
|
||||
// create dialog via fragment factory
|
||||
oDialog = sap.ui.xmlfragment(oView.getId(), 'sap.ui.piper.view.Dialog');
|
||||
oDialog.setBeginButton(new sap.m.Button({
|
||||
text: 'Close',
|
||||
press: function() {
|
||||
oDialog.close();
|
||||
}
|
||||
}));
|
||||
oView.addDependent(oDialog);
|
||||
}
|
||||
|
||||
// load from nodejs server
|
||||
var model = new JSONModel();
|
||||
model.loadData('data');
|
||||
this.getView().setModel(model);
|
||||
|
||||
oDialog.open();
|
||||
}
|
||||
});
|
||||
});
|
32
integration/testdata/TestKarmaIntegration/src/frontend/index.html
vendored
Normal file
32
integration/testdata/TestKarmaIntegration/src/frontend/index.html
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<!doctype html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<script id='sap-ui-bootstrap'
|
||||
src='https://sapui5.hana.ondemand.com/resources/sap-ui-core.js'
|
||||
data-sap-ui-theme='sap_belize'
|
||||
data-sap-ui-libs='sap.m'
|
||||
data-sap-ui-compatVersion='edge'
|
||||
data-sap-ui-preload='async'
|
||||
data-sap-ui-resourceroots='{
|
||||
"sap.ui.piper": "./"
|
||||
}' >
|
||||
</script>
|
||||
|
||||
<script>
|
||||
sap.ui.getCore().attachInit(function () {
|
||||
new sap.ui.core.ComponentContainer({
|
||||
name : "sap.ui.piper"
|
||||
}).placeAt("content");
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class='sapUiBody'>
|
||||
<div id='content'></div>
|
||||
</body>
|
||||
</html>
|
14
integration/testdata/TestKarmaIntegration/src/frontend/test/integration/AllJourneys.js
vendored
Normal file
14
integration/testdata/TestKarmaIntegration/src/frontend/test/integration/AllJourneys.js
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
jQuery.sap.require('sap.ui.qunit.qunit-css');
|
||||
jQuery.sap.require('sap.ui.thirdparty.qunit');
|
||||
jQuery.sap.require('sap.ui.qunit.qunit-junit');
|
||||
jQuery.sap.require('sap.ui.qunit.qunit-coverage');
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
|
||||
sap.ui.require([
|
||||
'sap/ui/test/Opa5',
|
||||
'sap/ui/piper/test/integration/navigation'
|
||||
], function (Opa5) {
|
||||
'use strict';
|
||||
|
||||
});
|
47
integration/testdata/TestKarmaIntegration/src/frontend/test/integration/navigation.js
vendored
Normal file
47
integration/testdata/TestKarmaIntegration/src/frontend/test/integration/navigation.js
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/*global QUnit*/
|
||||
/*global opaTest*/
|
||||
|
||||
sap.ui.require([
|
||||
'sap/ui/test/Opa5',
|
||||
'sap/ui/test/opaQunit',
|
||||
'sap/ui/piper/test/integration/pages/Common',
|
||||
'sap/ui/piper/test/integration/pages/App'
|
||||
], function (Opa5, opaTest, Common) {
|
||||
'use strict';
|
||||
|
||||
QUnit.module('Navigation', {
|
||||
beforeEach: function() {
|
||||
Opa5.extendConfig({
|
||||
arrangements: new Common(),
|
||||
viewNamespace: 'sap.ui.piper.view.',
|
||||
autoWait: true
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
opaTest('Should open the dialog', function (Given, When, Then) {
|
||||
|
||||
// Arrangements
|
||||
Given.iStartMyApp();
|
||||
|
||||
//Actions
|
||||
When.onTheAppPage.iPressTheOpenDialogButton();
|
||||
|
||||
// Assertions
|
||||
Then.onTheAppPage.iShouldSeeADialog().
|
||||
and.iTeardownMyUIComponent();
|
||||
});
|
||||
|
||||
opaTest('Should open a toast', function (Given, When, Then) {
|
||||
|
||||
// Arrangements
|
||||
Given.iStartMyApp();
|
||||
|
||||
//Actions
|
||||
When.onTheAppPage.iPressTheOpenToastButton();
|
||||
|
||||
// Assertions
|
||||
Then.onTheAppPage.iShouldSeeAToast().
|
||||
and.iTeardownMyUIComponent();
|
||||
});
|
||||
});
|
29
integration/testdata/TestKarmaIntegration/src/frontend/test/integration/opaTests.qunit.html
vendored
Normal file
29
integration/testdata/TestKarmaIntegration/src/frontend/test/integration/opaTests.qunit.html
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Opa tests for SAPUI5 Walkthrough</title>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<script id="sap-ui-bootstrap"
|
||||
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
|
||||
data-sap-ui-resourceroots='{
|
||||
"sap.ui.piper.test.integration": "./",
|
||||
"sap.ui.piper" : "../../"
|
||||
}'>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
// journeys
|
||||
jQuery.sap.require("sap.ui.piper.test.integration.AllJourneys");
|
||||
QUnit.start();
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="content"></div>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
</body>
|
||||
</html>
|
56
integration/testdata/TestKarmaIntegration/src/frontend/test/integration/pages/App.js
vendored
Normal file
56
integration/testdata/TestKarmaIntegration/src/frontend/test/integration/pages/App.js
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
sap.ui.require([
|
||||
'sap/ui/test/Opa5'
|
||||
],
|
||||
function (Opa5) {
|
||||
'use strict';
|
||||
|
||||
Opa5.createPageObjects({
|
||||
|
||||
onTheAppPage: {
|
||||
actions: {
|
||||
iPressTheOpenDialogButton: function () {
|
||||
return this.waitFor({
|
||||
controlType: 'sap.m.Button',
|
||||
success: function (aButtons) {
|
||||
aButtons[1].$().trigger('tap');
|
||||
},
|
||||
errorMessage: 'Did not find the showDialogButton button on the app page'
|
||||
});
|
||||
},
|
||||
iPressTheOpenToastButton: function () {
|
||||
return this.waitFor({
|
||||
controlType: 'sap.m.Button',
|
||||
success: function (aButtons) {
|
||||
aButtons[0].$().trigger('tap');
|
||||
},
|
||||
errorMessage: 'Did not find the showToastButton button on the app page'
|
||||
});
|
||||
}
|
||||
},
|
||||
assertions: {
|
||||
iShouldSeeADialog: function () {
|
||||
return this.waitFor({
|
||||
controlType: 'sap.m.Dialog',
|
||||
success: function () {
|
||||
Opa5.assert.ok(true, 'The dialog is open');
|
||||
},
|
||||
errorMessage: 'Did not find the dialog control'
|
||||
});
|
||||
},
|
||||
iShouldSeeAToast: function () {
|
||||
return this.waitFor({
|
||||
pollingInterval : 100,
|
||||
matchers: function () {
|
||||
return jQuery(".sapMMessageToast").text();
|
||||
},
|
||||
success : function () {
|
||||
ok(true, 'Found a Toast');
|
||||
//Opa5.assert.ok(true, 'The dialog is open');
|
||||
},
|
||||
errorMessage : 'No Toast message detected!'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
35
integration/testdata/TestKarmaIntegration/src/frontend/test/integration/pages/Common.js
vendored
Normal file
35
integration/testdata/TestKarmaIntegration/src/frontend/test/integration/pages/Common.js
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
sap.ui.define([
|
||||
'sap/ui/test/Opa5'
|
||||
],
|
||||
function (Opa5) {
|
||||
'use strict';
|
||||
|
||||
|
||||
function getFrameUrl(sHash, sUrlParameters) {
|
||||
sHash = sHash || "";
|
||||
var sUrl = jQuery.sap.getResourcePath("sap/ui/piper/index", ".html");
|
||||
if (sUrlParameters) {
|
||||
sUrlParameters = "?" + sUrlParameters;
|
||||
}
|
||||
return sUrl + sUrlParameters + "#" + sHash;
|
||||
}
|
||||
|
||||
return Opa5.extend('sap.ui.piper.test.integration.pages.Common', {
|
||||
|
||||
iStartMyApp : function (oOptions) {
|
||||
var sUrlParameters;
|
||||
oOptions = oOptions || { delay: 0 };
|
||||
|
||||
sUrlParameters = "serverDelay=" + oOptions.delay;
|
||||
sUrlParameters += "&responderOn=true";
|
||||
sUrlParameters += "&sap-ui-language=en_US";
|
||||
|
||||
this.iStartMyUIComponent({
|
||||
componentConfig: {
|
||||
name: "sap.ui.piper"
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
6
integration/testdata/TestKarmaIntegration/src/frontend/test/karma-qunit.js
vendored
Normal file
6
integration/testdata/TestKarmaIntegration/src/frontend/test/karma-qunit.js
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
(function() {
|
||||
"use strict";
|
||||
document.body.innerHTML += '<div id="content"></div>';
|
||||
document.body.innerHTML += '<div id="qunit"></div>';
|
||||
sap.ui.require([ "sap/ui/qunit/qunit-css" ]);
|
||||
}());
|
30
integration/testdata/TestKarmaIntegration/src/frontend/view/App.view.xml
vendored
Normal file
30
integration/testdata/TestKarmaIntegration/src/frontend/view/App.view.xml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<mvc:View
|
||||
height="100%"
|
||||
displayBlock="true"
|
||||
controllerName="sap.ui.piper.controller.App"
|
||||
xmlns="sap.m"
|
||||
xmlns:core="sap.ui.core"
|
||||
xmlns:mvc="sap.ui.core.mvc" >
|
||||
|
||||
<App>
|
||||
<pages>
|
||||
<Page title="Demo Sapui5 Page">
|
||||
<content>
|
||||
<FlexBox height="500px" alignItems="Center" justifyContent="Center">
|
||||
<items>
|
||||
<Button
|
||||
id="showToast"
|
||||
text="Show Toast"
|
||||
press="onShowToast"/>
|
||||
<Button
|
||||
id="showDialog"
|
||||
text="Show Dialog"
|
||||
press="onShowDialog"/>
|
||||
</items>
|
||||
</FlexBox>
|
||||
</content>
|
||||
</Page>
|
||||
</pages>
|
||||
</App>
|
||||
|
||||
</mvc:View>
|
17
integration/testdata/TestKarmaIntegration/src/frontend/view/Dialog.fragment.xml
vendored
Normal file
17
integration/testdata/TestKarmaIntegration/src/frontend/view/Dialog.fragment.xml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<core:FragmentDefinition
|
||||
xmlns="sap.m"
|
||||
xmlns:core="sap.ui.core" >
|
||||
<Dialog
|
||||
id="demoDialog"
|
||||
title="Demo Dialog">
|
||||
<content>
|
||||
<List
|
||||
headerText='Products'
|
||||
items='{/Products}' >
|
||||
|
||||
<StandardListItem title='{name}' description="{price}" />
|
||||
|
||||
</List>
|
||||
</content>
|
||||
</Dialog>
|
||||
</core:FragmentDefinition>
|
Loading…
x
Reference in New Issue
Block a user