Skip to content
This repository was archived by the owner on Jun 16, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ speedleUnitTests:
go test ${TEST_OPTS} github.com/oracle/speedle/cmd/spctl/pdl
go test ${TEST_OPTS} github.com/oracle/speedle/pkg/suid
go test ${TEST_OPTS} github.com/oracle/speedle/pkg/assertion
go clean -testcache
go clean -testcache github.com/oracle/speedle/pkg/eval
STORE_TYPE=etcd go test ${TEST_OPTS} github.com/oracle/speedle/pkg/eval

testSpeedleRest:
Expand Down
18 changes: 15 additions & 3 deletions ci/setBuildEnv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

homeDir=$(cd $(dirname ${BASH_SOURCE[0]})/.. > /dev/null; pwd -P)

export GOPATH=$homeDir
mkdir -p $GOPATH/src/github.com/oracle
ln -s $homeDir $GOPATH/src/github.com/oracle/speedle
if [ ! -e ${homeDir}/bin ]; then
mkdir ${homeDir}/bin
fi
rmdir /go/bin
ln -s ${homeDir}/bin /go/bin

if [ ! -e $WERCKER_CACHE_DIR/pkg ]; then
mkdir $WERCKER_CACHE_DIR/pkg
fi
if [ -e /go/pkg ]; then
rmdir /go/pkg
fi
ln -s $WERCKER_CACHE_DIR/pkg /go/pkg

export GOPATH=/go
6 changes: 4 additions & 2 deletions cmd/spctl/command/run_etcd_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
set -ex
#source pkg/svcs/pmsrest/start_etcd.sh
rm -rf ./speedle.etcd
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh
go clean -testcache
source $(dirname $0)/../../../setTestEnv.sh
go clean -testcache github.com/oracle/speedle/cmd/spctl/command

exit 0

#Reconfig spctl
${GOPATH}/bin/spctl config pms-endpoint http://localhost:6733/policy-mgmt/v1/
Expand Down
2 changes: 1 addition & 1 deletion cmd/spctl/command/run_file_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -ex

#Reconfig spctl
${GOPATH}/bin/spctl config pms-endpoint http://localhost:6733/policy-mgmt/v1/
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh
source $(dirname $0)/../../../setTestEnv.sh

startPMS file --config-file pkg/svcs/pmsrest/config_file.json
go test ${TEST_OPTS} github.com/oracle/speedle/cmd/spctl/command -run=TestMats
Expand Down
51 changes: 51 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
module github.com/oracle/speedle

go 1.12

require (
github.com/armon/go-radix v1.0.0
github.com/coreos/bbolt v1.3.2 // indirect
github.com/coreos/etcd v3.3.10+incompatible
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/fsnotify/fsnotify v1.4.7
github.com/gogo/protobuf v1.2.1 // indirect
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
github.com/golang/protobuf v1.3.0
github.com/google/btree v1.0.0 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/mux v1.6.2
github.com/gorilla/websocket v1.4.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.8.5 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/natefinch/lumberjack v0.0.0-20170531160350-a96e63847dc3
github.com/pkg/errors v0.8.0
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 // indirect
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 // indirect
github.com/sirupsen/logrus v1.2.0
github.com/soheilhy/cmux v0.1.4 // indirect
github.com/spf13/cobra v0.0.2
github.com/spf13/pflag v1.0.1
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
github.com/ugorji/go v1.1.1 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.etcd.io/bbolt v1.3.2 // indirect
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.9.1 // indirect
golang.org/x/net v0.0.0-20190311183353-d8887717615a
golang.org/x/sys v0.0.0-20190312061237-fead79001313 // indirect
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7 // indirect
google.golang.org/grpc v1.19.0
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.2.2 // indirect
)

replace github.com/golang/sync v0.0.0-20190423024810-112230192c58 => golang.org/x/sync v0.0.0-20190423024810-112230192c58
163 changes: 163 additions & 0 deletions go.sum

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions pkg/svcs/adsgrpc/run_etcd_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ shell_dir=$(dirname $0)
rm -rf ./speedle.etcd

set -ex
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh
source ${shell_dir}/../../../setTestEnv.sh

go clean -testcache

startPMS etcd --config-file ${shell_dir}/../pmsrest/config_etcd.json
startADS --config-file ${shell_dir}/../pmsrest/config_etcd.json


go clean -testcache github.com/oracle/speedle/pkg/svcs/adsgrpc
go test ${TEST_OPTS} github.com/oracle/speedle/pkg/svcs/adsgrpc -run=TestMats
rm -rf ./speedle.etcd
2 changes: 1 addition & 1 deletion pkg/svcs/adsgrpc/run_file_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ shell_dir=$(dirname $0)
temp_policy_file=/tmp/speedle-test-file-store.json

set -ex
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh
source ${shell_dir}/../../../setTestEnv.sh

startPMS file --config-file ${shell_dir}/../pmsrest/config_file.json
startADS --config-file ${shell_dir}/../pmsrest/config_file.json
Expand Down
4 changes: 2 additions & 2 deletions pkg/svcs/adsrest/run_etcd_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ shell_dir=$(dirname $0)
set -ex
#source pkg/svcs/pmsrest/start_etcd.sh
rm -rf ./speedle.etcd
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh
go clean -testcache
source ${shell_dir}/../../../setTestEnv.sh

#Reconfig spctl
${GOPATH}/bin/spctl config ads-endpoint http://localhost:6734/authz-check/v1/
Expand All @@ -15,6 +14,7 @@ ${GOPATH}/bin/spctl config pms-endpoint http://localhost:6733/policy-mgmt/v1/
startPMS etcd --config-file ${shell_dir}/../pmsrest/config_etcd.json
startADS --config-file ${shell_dir}/../pmsrest/config_etcd.json

go clean -testcache github.com/oracle/speedle/pkg/svcs/adsrest
${GOPATH}/bin/spctl delete service --all
go test ${TEST_OPTS} github.com/oracle/speedle/pkg/svcs/adsrest -tags=runtime_test_prepare
${GOPATH}/bin/spctl get service --all
Expand Down
2 changes: 1 addition & 1 deletion pkg/svcs/adsrest/run_file_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
shell_dir=$(dirname $0)

set -ex
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh
source ${shell_dir}/../../../setTestEnv.sh

#Reconfig spctl
${GOPATH}/bin/spctl config ads-endpoint http://localhost:6734/authz-check/v1/
Expand Down
2 changes: 1 addition & 1 deletion pkg/svcs/adsrest/run_test_test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#/bin/sh
set -ex
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh
source $(dirname $0)/../../../setTestEnv.sh

#Reconfig spctl
${GOPATH}/bin/spctl config ads-endpoint http://localhost:6734/authz-check/v1/
Expand Down
5 changes: 2 additions & 3 deletions pkg/svcs/pmsgrpc/run_etcd_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ shell_dir=$(dirname $0)
rm -rf ./speedle.etcd

set -ex
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh

go clean -testcache
source ${shell_dir}/../../../setTestEnv.sh

startPMS etcd --config-file ${shell_dir}/../pmsrest/config_etcd.json

go clean -testcache github.com/oracle/speedle/pkg/svcs/pmsgrpc
go test ${TEST_OPTS} github.com/oracle/speedle/pkg/svcs/pmsgrpc -run=TestMats
rm -rf ./speedle.etcd
2 changes: 1 addition & 1 deletion pkg/svcs/pmsgrpc/run_file_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ shell_dir=$(dirname $0)
temp_policy_file=/tmp/speedle-test-file-store.json

set -ex
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh
source ${shell_dir}/../../../setTestEnv.sh

startPMS file --config-file ${shell_dir}/../pmsrest/config_file.json

Expand Down
5 changes: 2 additions & 3 deletions pkg/svcs/pmsrest/run_etcd_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
shell_dir=$(dirname $0)

set -ex
#source ${shell_dir}/start_etcd.sh
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh
source ${shell_dir}/../../../setTestEnv.sh

go clean -testcache

startPMS etcd --config-file ${shell_dir}/config_etcd.json

go clean -testcache github.com/oracle/speedle/pkg/svcs/pmsrest
go test ${TEST_OPTS} github.com/oracle/speedle/pkg/svcs/pmsrest $*
2 changes: 1 addition & 1 deletion pkg/svcs/pmsrest/run_file_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
shell_dir=$(dirname $0)

set -ex
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh
source ${shell_dir}/../../../setTestEnv.sh

startPMS file --config-file ${shell_dir}/config_file.json

Expand Down
2 changes: 1 addition & 1 deletion pkg/svcs/pmsrest/tls_test-force-client-cert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

shell_dir=$(dirname $0)
# set -x
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh
source ${shell_dir}/../../../setTestEnv.sh
${GOPATH}/bin/spctl config pms-endpoint https://localhost:6733/policy-mgmt/v1/


Expand Down
2 changes: 1 addition & 1 deletion pkg/svcs/pmsrest/tls_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

shell_dir=$(dirname $0)
# set -x
source ${GOPATH}/src/github.com/oracle/speedle/setTestEnv.sh
source ${shell_dir}/../../../setTestEnv.sh
${GOPATH}/bin/spctl config pms-endpoint https://localhost:6733/policy-mgmt/v1/

log::showTitle "Start pms service" && \
Expand Down
13 changes: 13 additions & 0 deletions samples/integration/docker-integration/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module github.com/oracle/speedle/samples/docker-int

go 1.12

require (
github.com/Microsoft/go-winio v0.4.12 // indirect
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-plugins-helpers v0.0.0-20181025120712-1e6269c305b8
github.com/stretchr/testify v1.3.0 // indirect
golang.org/x/net v0.0.0-20190420063019-afa5a82059c6 // indirect
golang.org/x/sys v0.0.0-20190422165155-953cdadca894 // indirect
)
22 changes: 22 additions & 0 deletions samples/integration/docker-integration/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
github.com/Microsoft/go-winio v0.4.12 h1:xAfWHN1IrQ0NJ9TBC0KBZoqLjzDTr1ML+4MywiUOryc=
github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
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-plugins-helpers v0.0.0-20181025120712-1e6269c305b8 h1:9Hsno4vmXpQ0yVAp07bLxS5dHH24w80xzmUCLil47ME=
github.com/docker/go-plugins-helpers v0.0.0-20181025120712-1e6269c305b8/go.mod h1:LFyLie6XcDbyKGeVK6bHe+9aJTYCxWLBg5IrJZOaXKA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190420063019-afa5a82059c6 h1:HdqqaWmYAUI7/dmByKKEw+yxDksGSo+9GjkUc9Zp34E=
golang.org/x/net v0.0.0-20190420063019-afa5a82059c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
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/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
49 changes: 49 additions & 0 deletions samples/integration/istio-integration/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
module github.com/oracle/speedle/samples/istio-int

go 1.12

replace github.com/golang/sync v0.0.0 => golang.org/x/sync v0.0.0

require (
github.com/cenkalti/backoff v2.1.1+incompatible // indirect
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd // indirect
github.com/d4l3k/messagediff v1.2.1 // indirect
github.com/envoyproxy/go-control-plane v0.7.1 // indirect
github.com/envoyproxy/protoc-gen-validate v0.0.14 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/gogo/googleapis v1.2.0 // indirect
github.com/gogo/status v1.1.0 // indirect
github.com/google/cel-go v0.2.0 // indirect
github.com/gorilla/mux v1.7.1 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/howeyc/fsnotify v0.9.0 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/natefinch/lumberjack v2.0.0+incompatible // indirect
github.com/onsi/gomega v1.5.0 // indirect
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/prometheus/prom2json v1.1.0 // indirect
github.com/spf13/cobra v0.0.3 // indirect
github.com/stretchr/testify v1.3.0 // indirect
github.com/uber/jaeger-client-go v2.16.0+incompatible // indirect
github.com/uber/jaeger-lib v2.0.0+incompatible // indirect
github.com/yl2chen/cidranger v0.0.0-20180214081945-928b519e5268 // indirect
go.opencensus.io v0.20.2 // indirect
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.9.1 // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7 // indirect
google.golang.org/grpc v1.20.1
gopkg.in/d4l3k/messagediff.v1 v1.2.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.2.2 // indirect
istio.io/api v0.0.0-20190405142752-6b8d1849e7f4
istio.io/istio v0.0.0-20190423074819-1ff536eeadc2
k8s.io/api v0.0.0-20190419092548-c5cad27821f6 // indirect
k8s.io/apimachinery v0.0.0-20190419212445-b874eabb9a4e // indirect
k8s.io/client-go v11.0.0+incompatible // indirect
k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7 // indirect
)
Loading