Skip to content

Commit 5749420

Browse files
committed
Add /v2 to package to comply with golang's semantic import versioning
1 parent 3f8c23f commit 5749420

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+250
-245
lines changed

cal/cal_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"testing"
1919
"time"
2020

21-
"github.com/Netflix/chaosmonkey/cal"
21+
"github.com/Netflix/chaosmonkey/v2/cal"
2222
)
2323

2424
var weekdayTests = []struct {

chaosmonkey_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package chaosmonkey_test
1717
import (
1818
"testing"
1919

20-
"github.com/Netflix/chaosmonkey"
20+
"github.com/Netflix/chaosmonkey/v2"
2121
)
2222

2323
func TestExceptionMatches(t *testing.T) {

cmd/chaosmonkey/main.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ Chaos Monkey randomly terminates instances.
1818
package main
1919

2020
import (
21-
"github.com/Netflix/chaosmonkey/command"
21+
"github.com/Netflix/chaosmonkey/v2/command"
2222

2323
// These are anonymous imported so that the related Get* methods (e.g.,
2424
// GetDecryptor) are picked up.
2525

26-
_ "github.com/Netflix/chaosmonkey/constrainer"
27-
_ "github.com/Netflix/chaosmonkey/decryptor"
28-
_ "github.com/Netflix/chaosmonkey/env"
29-
_ "github.com/Netflix/chaosmonkey/errorcounter"
30-
_ "github.com/Netflix/chaosmonkey/outage"
31-
_ "github.com/Netflix/chaosmonkey/tracker"
26+
_ "github.com/Netflix/chaosmonkey/v2/constrainer"
27+
_ "github.com/Netflix/chaosmonkey/v2/decryptor"
28+
_ "github.com/Netflix/chaosmonkey/v2/env"
29+
_ "github.com/Netflix/chaosmonkey/v2/errorcounter"
30+
_ "github.com/Netflix/chaosmonkey/v2/outage"
31+
_ "github.com/Netflix/chaosmonkey/v2/tracker"
3232
)
3333

3434
func main() {

command/chaosmonkey.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ import (
2525

2626
flag "github.com/spf13/pflag"
2727

28-
"github.com/Netflix/chaosmonkey"
29-
"github.com/Netflix/chaosmonkey/clock"
30-
"github.com/Netflix/chaosmonkey/config"
31-
"github.com/Netflix/chaosmonkey/config/param"
32-
"github.com/Netflix/chaosmonkey/deploy"
33-
"github.com/Netflix/chaosmonkey/deps"
34-
"github.com/Netflix/chaosmonkey/mysql"
35-
"github.com/Netflix/chaosmonkey/schedstore"
36-
"github.com/Netflix/chaosmonkey/schedule"
37-
"github.com/Netflix/chaosmonkey/spinnaker"
28+
"github.com/Netflix/chaosmonkey/v2"
29+
"github.com/Netflix/chaosmonkey/v2/clock"
30+
"github.com/Netflix/chaosmonkey/v2/config"
31+
"github.com/Netflix/chaosmonkey/v2/config/param"
32+
"github.com/Netflix/chaosmonkey/v2/deploy"
33+
"github.com/Netflix/chaosmonkey/v2/deps"
34+
"github.com/Netflix/chaosmonkey/v2/mysql"
35+
"github.com/Netflix/chaosmonkey/v2/schedstore"
36+
"github.com/Netflix/chaosmonkey/v2/schedule"
37+
"github.com/Netflix/chaosmonkey/v2/spinnaker"
3838
)
3939

4040
// Version is the version number

command/dumpconfig.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"fmt"
1919
"os"
2020

21-
"github.com/Netflix/chaosmonkey"
21+
"github.com/Netflix/chaosmonkey/v2"
2222
"github.com/davecgh/go-spew/spew"
2323
)
2424

command/dumpmonkeyconfig.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package command
1717
import (
1818
"fmt"
1919

20-
"github.com/Netflix/chaosmonkey/config"
20+
"github.com/Netflix/chaosmonkey/v2/config"
2121
)
2222

2323
// DumpMonkeyConfig dumps the monkey-level config parameters to stdout

command/eligible.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ import (
1818
"fmt"
1919
"os"
2020

21-
"github.com/Netflix/chaosmonkey"
22-
"github.com/Netflix/chaosmonkey/deploy"
23-
"github.com/Netflix/chaosmonkey/eligible"
24-
"github.com/Netflix/chaosmonkey/grp"
21+
"github.com/Netflix/chaosmonkey/v2"
22+
"github.com/Netflix/chaosmonkey/v2/deploy"
23+
"github.com/Netflix/chaosmonkey/v2/eligible"
24+
"github.com/Netflix/chaosmonkey/v2/grp"
2525
)
2626

2727
// Eligible prints out a list of instance ids eligible for termination

command/fetchschedule.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"log"
1919
"time"
2020

21-
"github.com/Netflix/chaosmonkey/config"
22-
"github.com/Netflix/chaosmonkey/schedstore"
21+
"github.com/Netflix/chaosmonkey/v2/config"
22+
"github.com/Netflix/chaosmonkey/v2/schedstore"
2323
)
2424

2525
// FetchSchedule executes the "fetch-schedule" command. This checks if there

command/install.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ package command
1616

1717
import (
1818
"fmt"
19-
"github.com/Netflix/chaosmonkey/config"
20-
"github.com/Netflix/chaosmonkey/mysql"
19+
"github.com/Netflix/chaosmonkey/v2/config"
20+
"github.com/Netflix/chaosmonkey/v2/mysql"
2121
"io/ioutil"
2222
"log"
2323
"os"

command/install_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ package command
1616

1717
import (
1818
"fmt"
19-
"github.com/Netflix/chaosmonkey/config"
20-
"github.com/Netflix/chaosmonkey/config/param"
21-
"github.com/Netflix/chaosmonkey/mock"
19+
"github.com/Netflix/chaosmonkey/v2/config"
20+
"github.com/Netflix/chaosmonkey/v2/config/param"
21+
"github.com/Netflix/chaosmonkey/v2/mock"
2222
"github.com/pkg/errors"
2323
"io/ioutil"
2424
"testing"

command/migrate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
package command
1616

1717
import (
18-
"github.com/Netflix/chaosmonkey/mysql"
18+
"github.com/Netflix/chaosmonkey/v2/mysql"
1919
"log"
2020
)
2121

command/outage.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"fmt"
1919
"os"
2020

21-
"github.com/Netflix/chaosmonkey"
21+
"github.com/Netflix/chaosmonkey/v2"
2222
)
2323

2424
// Outage prints out "true" if an ongoing outage, else "false"

command/regions.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ package command
1616

1717
import (
1818
"fmt"
19-
"github.com/Netflix/chaosmonkey/deploy"
20-
"github.com/Netflix/chaosmonkey/spinnaker"
19+
"github.com/Netflix/chaosmonkey/v2/deploy"
20+
"github.com/Netflix/chaosmonkey/v2/spinnaker"
2121
"github.com/SmartThingsOSS/frigga-go"
2222
"os"
2323
)

command/schedule.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ import (
2121
"os"
2222
"time"
2323

24-
"github.com/Netflix/chaosmonkey"
25-
"github.com/Netflix/chaosmonkey/config"
26-
"github.com/Netflix/chaosmonkey/deploy"
27-
"github.com/Netflix/chaosmonkey/schedstore"
28-
"github.com/Netflix/chaosmonkey/schedule"
24+
"github.com/Netflix/chaosmonkey/v2"
25+
"github.com/Netflix/chaosmonkey/v2/config"
26+
"github.com/Netflix/chaosmonkey/v2/deploy"
27+
"github.com/Netflix/chaosmonkey/v2/schedstore"
28+
"github.com/Netflix/chaosmonkey/v2/schedule"
2929
)
3030

3131
// Schedule executes the "schedule" command. This defines the schedule

command/schedule_int_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import (
2020
"testing"
2121
"time"
2222

23-
"github.com/Netflix/chaosmonkey"
24-
"github.com/Netflix/chaosmonkey/config"
25-
"github.com/Netflix/chaosmonkey/config/param"
26-
"github.com/Netflix/chaosmonkey/constrainer"
27-
"github.com/Netflix/chaosmonkey/mock"
28-
"github.com/Netflix/chaosmonkey/schedule"
23+
"github.com/Netflix/chaosmonkey/v2"
24+
"github.com/Netflix/chaosmonkey/v2/config"
25+
"github.com/Netflix/chaosmonkey/v2/config/param"
26+
"github.com/Netflix/chaosmonkey/v2/constrainer"
27+
"github.com/Netflix/chaosmonkey/v2/mock"
28+
"github.com/Netflix/chaosmonkey/v2/schedule"
2929
)
3030

3131
// TestSchedule verifies the schedule command generates a cron file with

command/schedule_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ import (
1919
"testing"
2020
"time"
2121

22-
"github.com/Netflix/chaosmonkey/config"
23-
"github.com/Netflix/chaosmonkey/config/param"
24-
"github.com/Netflix/chaosmonkey/grp"
25-
"github.com/Netflix/chaosmonkey/schedule"
22+
"github.com/Netflix/chaosmonkey/v2/config"
23+
"github.com/Netflix/chaosmonkey/v2/config/param"
24+
"github.com/Netflix/chaosmonkey/v2/grp"
25+
"github.com/Netflix/chaosmonkey/v2/schedule"
2626
)
2727

2828
// addToSchedule schedules instanceId for termination at timeString

command/terminate.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ package command
1717
import (
1818
"log"
1919

20-
"github.com/Netflix/chaosmonkey/deps"
21-
"github.com/Netflix/chaosmonkey/term"
20+
"github.com/Netflix/chaosmonkey/v2/deps"
21+
"github.com/Netflix/chaosmonkey/v2/term"
2222
)
2323

2424
// Terminate executes the "terminate" command. This selects an instance

config/monkey.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"github.com/spf13/pflag"
2929
"github.com/spf13/viper"
3030

31-
"github.com/Netflix/chaosmonkey/config/param"
31+
"github.com/Netflix/chaosmonkey/v2/config/param"
3232
)
3333

3434
// Monkey is is a config implementation backed by viper

config/monkey_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package config
1616

1717
import (
1818
"fmt"
19-
"github.com/Netflix/chaosmonkey/config/param"
19+
"github.com/Netflix/chaosmonkey/v2/config/param"
2020
"testing"
2121
)
2222

constrainer/constrainer.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
package constrainer
1616

1717
import (
18-
"github.com/Netflix/chaosmonkey/config"
19-
"github.com/Netflix/chaosmonkey/deps"
20-
"github.com/Netflix/chaosmonkey/schedule"
18+
"github.com/Netflix/chaosmonkey/v2/config"
19+
"github.com/Netflix/chaosmonkey/v2/deps"
20+
"github.com/Netflix/chaosmonkey/v2/schedule"
2121
)
2222

2323
// NullConstrainer is a no-op constrainer

decryptor/decryptor.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
package decryptor
1616

1717
import (
18-
"github.com/Netflix/chaosmonkey"
19-
"github.com/Netflix/chaosmonkey/config"
20-
"github.com/Netflix/chaosmonkey/deps"
18+
"github.com/Netflix/chaosmonkey/v2"
19+
"github.com/Netflix/chaosmonkey/v2/config"
20+
"github.com/Netflix/chaosmonkey/v2/deps"
2121
"github.com/pkg/errors"
2222
)
2323

deploy/eligible_instance_groups.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"fmt"
1919
"log"
2020

21-
"github.com/Netflix/chaosmonkey"
22-
"github.com/Netflix/chaosmonkey/grp"
21+
"github.com/Netflix/chaosmonkey/v2"
22+
"github.com/Netflix/chaosmonkey/v2/grp"
2323
)
2424

2525
// EligibleInstanceGroups returns a slice of InstanceGroups that represent
@@ -30,14 +30,14 @@ import (
3030
// termination, not when considering groups of eligible instances.
3131
//
3232
// The way instances are divided into group will depend on
33-
// * the grouping configuration for the app (cluster, stack, app)
34-
// * whether regions are independent
33+
// - the grouping configuration for the app (cluster, stack, app)
34+
// - whether regions are independent
3535
//
3636
// The returned InstanceGroups are guaranteed to contain at least one instance
3737
// each
3838
//
3939
// Preconditions:
40-
// * app is enabled for Chaos Monkey
40+
// - app is enabled for Chaos Monkey
4141
func (app *App) EligibleInstanceGroups(cfg chaosmonkey.AppConfig) []grp.InstanceGroup {
4242
if !cfg.Enabled {
4343
log.Fatalf("app %s unexpectedly disabled", app.Name())

deploy/eligible_instance_groups_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"reflect"
1919
"testing"
2020

21-
"github.com/Netflix/chaosmonkey"
22-
"github.com/Netflix/chaosmonkey/grp"
21+
"github.com/Netflix/chaosmonkey/v2"
22+
"github.com/Netflix/chaosmonkey/v2/grp"
2323
)
2424

2525
type groupList []grp.InstanceGroup

deps/deps.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
package deps
1717

1818
import (
19-
"github.com/Netflix/chaosmonkey"
20-
"github.com/Netflix/chaosmonkey/clock"
21-
"github.com/Netflix/chaosmonkey/config"
22-
"github.com/Netflix/chaosmonkey/deploy"
23-
"github.com/Netflix/chaosmonkey/schedule"
19+
"github.com/Netflix/chaosmonkey/v2"
20+
"github.com/Netflix/chaosmonkey/v2/clock"
21+
"github.com/Netflix/chaosmonkey/v2/config"
22+
"github.com/Netflix/chaosmonkey/v2/deploy"
23+
"github.com/Netflix/chaosmonkey/v2/schedule"
2424
)
2525

2626
var (

eligible/eligible.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
package eligible
1717

1818
import (
19-
"github.com/Netflix/chaosmonkey"
20-
"github.com/Netflix/chaosmonkey/deploy"
21-
"github.com/Netflix/chaosmonkey/grp"
19+
"github.com/Netflix/chaosmonkey/v2"
20+
"github.com/Netflix/chaosmonkey/v2/deploy"
21+
"github.com/Netflix/chaosmonkey/v2/grp"
2222
"github.com/SmartThingsOSS/frigga-go"
2323
"github.com/pkg/errors"
2424
"strings"

eligible/eligible_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package eligible
22

33
import (
4-
"github.com/Netflix/chaosmonkey"
5-
D "github.com/Netflix/chaosmonkey/deploy"
6-
"github.com/Netflix/chaosmonkey/grp"
7-
"github.com/Netflix/chaosmonkey/mock"
4+
"github.com/Netflix/chaosmonkey/v2"
5+
D "github.com/Netflix/chaosmonkey/v2/deploy"
6+
"github.com/Netflix/chaosmonkey/v2/grp"
7+
"github.com/Netflix/chaosmonkey/v2/mock"
88
"sort"
99
"testing"
1010
)

eligible/instances_canary_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ package eligible
1717
import (
1818
"testing"
1919

20-
D "github.com/Netflix/chaosmonkey/deploy"
21-
"github.com/Netflix/chaosmonkey/grp"
22-
"github.com/Netflix/chaosmonkey/mock"
20+
D "github.com/Netflix/chaosmonkey/v2/deploy"
21+
"github.com/Netflix/chaosmonkey/v2/grp"
22+
"github.com/Netflix/chaosmonkey/v2/mock"
2323
)
2424

2525
// Test that canaries are not considered eligible instances

eligible/instances_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ package eligible
1717
import (
1818
"testing"
1919

20-
"github.com/Netflix/chaosmonkey"
21-
D "github.com/Netflix/chaosmonkey/deploy"
22-
"github.com/Netflix/chaosmonkey/grp"
23-
"github.com/Netflix/chaosmonkey/mock"
20+
"github.com/Netflix/chaosmonkey/v2"
21+
D "github.com/Netflix/chaosmonkey/v2/deploy"
22+
"github.com/Netflix/chaosmonkey/v2/grp"
23+
"github.com/Netflix/chaosmonkey/v2/mock"
2424
)
2525

2626
// mockDeployment returns a deploy.Deployment object mock for testing

env/env.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
package env
1818

1919
import (
20-
"github.com/Netflix/chaosmonkey"
21-
"github.com/Netflix/chaosmonkey/config"
22-
"github.com/Netflix/chaosmonkey/deps"
20+
"github.com/Netflix/chaosmonkey/v2"
21+
"github.com/Netflix/chaosmonkey/v2/config"
22+
"github.com/Netflix/chaosmonkey/v2/deps"
2323
)
2424

2525
// notTestEnv is an environment that does not report as a test env

0 commit comments

Comments
 (0)