Skip to content

Commit

Permalink
Add /v2 to package to comply with golang's semantic import versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
ttomsu committed Jan 20, 2023
1 parent 3f8c23f commit 5749420
Show file tree
Hide file tree
Showing 56 changed files with 250 additions and 245 deletions.
2 changes: 1 addition & 1 deletion cal/cal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"testing"
"time"

"github.com/Netflix/chaosmonkey/cal"
"github.com/Netflix/chaosmonkey/v2/cal"
)

var weekdayTests = []struct {
Expand Down
2 changes: 1 addition & 1 deletion chaosmonkey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package chaosmonkey_test
import (
"testing"

"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/v2"
)

func TestExceptionMatches(t *testing.T) {
Expand Down
14 changes: 7 additions & 7 deletions cmd/chaosmonkey/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ Chaos Monkey randomly terminates instances.
package main

import (
"github.com/Netflix/chaosmonkey/command"
"github.com/Netflix/chaosmonkey/v2/command"

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

_ "github.com/Netflix/chaosmonkey/constrainer"
_ "github.com/Netflix/chaosmonkey/decryptor"
_ "github.com/Netflix/chaosmonkey/env"
_ "github.com/Netflix/chaosmonkey/errorcounter"
_ "github.com/Netflix/chaosmonkey/outage"
_ "github.com/Netflix/chaosmonkey/tracker"
_ "github.com/Netflix/chaosmonkey/v2/constrainer"
_ "github.com/Netflix/chaosmonkey/v2/decryptor"
_ "github.com/Netflix/chaosmonkey/v2/env"
_ "github.com/Netflix/chaosmonkey/v2/errorcounter"
_ "github.com/Netflix/chaosmonkey/v2/outage"
_ "github.com/Netflix/chaosmonkey/v2/tracker"
)

func main() {
Expand Down
20 changes: 10 additions & 10 deletions command/chaosmonkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ import (

flag "github.com/spf13/pflag"

"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/clock"
"github.com/Netflix/chaosmonkey/config"
"github.com/Netflix/chaosmonkey/config/param"
"github.com/Netflix/chaosmonkey/deploy"
"github.com/Netflix/chaosmonkey/deps"
"github.com/Netflix/chaosmonkey/mysql"
"github.com/Netflix/chaosmonkey/schedstore"
"github.com/Netflix/chaosmonkey/schedule"
"github.com/Netflix/chaosmonkey/spinnaker"
"github.com/Netflix/chaosmonkey/v2"
"github.com/Netflix/chaosmonkey/v2/clock"
"github.com/Netflix/chaosmonkey/v2/config"
"github.com/Netflix/chaosmonkey/v2/config/param"
"github.com/Netflix/chaosmonkey/v2/deploy"
"github.com/Netflix/chaosmonkey/v2/deps"
"github.com/Netflix/chaosmonkey/v2/mysql"
"github.com/Netflix/chaosmonkey/v2/schedstore"
"github.com/Netflix/chaosmonkey/v2/schedule"
"github.com/Netflix/chaosmonkey/v2/spinnaker"
)

// Version is the version number
Expand Down
2 changes: 1 addition & 1 deletion command/dumpconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"os"

"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/v2"
"github.com/davecgh/go-spew/spew"
)

Expand Down
2 changes: 1 addition & 1 deletion command/dumpmonkeyconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package command
import (
"fmt"

"github.com/Netflix/chaosmonkey/config"
"github.com/Netflix/chaosmonkey/v2/config"
)

// DumpMonkeyConfig dumps the monkey-level config parameters to stdout
Expand Down
8 changes: 4 additions & 4 deletions command/eligible.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"fmt"
"os"

"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/deploy"
"github.com/Netflix/chaosmonkey/eligible"
"github.com/Netflix/chaosmonkey/grp"
"github.com/Netflix/chaosmonkey/v2"
"github.com/Netflix/chaosmonkey/v2/deploy"
"github.com/Netflix/chaosmonkey/v2/eligible"
"github.com/Netflix/chaosmonkey/v2/grp"
)

// Eligible prints out a list of instance ids eligible for termination
Expand Down
4 changes: 2 additions & 2 deletions command/fetchschedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"log"
"time"

"github.com/Netflix/chaosmonkey/config"
"github.com/Netflix/chaosmonkey/schedstore"
"github.com/Netflix/chaosmonkey/v2/config"
"github.com/Netflix/chaosmonkey/v2/schedstore"
)

// FetchSchedule executes the "fetch-schedule" command. This checks if there
Expand Down
4 changes: 2 additions & 2 deletions command/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package command

import (
"fmt"
"github.com/Netflix/chaosmonkey/config"
"github.com/Netflix/chaosmonkey/mysql"
"github.com/Netflix/chaosmonkey/v2/config"
"github.com/Netflix/chaosmonkey/v2/mysql"
"io/ioutil"
"log"
"os"
Expand Down
6 changes: 3 additions & 3 deletions command/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ package command

import (
"fmt"
"github.com/Netflix/chaosmonkey/config"
"github.com/Netflix/chaosmonkey/config/param"
"github.com/Netflix/chaosmonkey/mock"
"github.com/Netflix/chaosmonkey/v2/config"
"github.com/Netflix/chaosmonkey/v2/config/param"
"github.com/Netflix/chaosmonkey/v2/mock"
"github.com/pkg/errors"
"io/ioutil"
"testing"
Expand Down
2 changes: 1 addition & 1 deletion command/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package command

import (
"github.com/Netflix/chaosmonkey/mysql"
"github.com/Netflix/chaosmonkey/v2/mysql"
"log"
)

Expand Down
2 changes: 1 addition & 1 deletion command/outage.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"os"

"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/v2"
)

// Outage prints out "true" if an ongoing outage, else "false"
Expand Down
4 changes: 2 additions & 2 deletions command/regions.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package command

import (
"fmt"
"github.com/Netflix/chaosmonkey/deploy"
"github.com/Netflix/chaosmonkey/spinnaker"
"github.com/Netflix/chaosmonkey/v2/deploy"
"github.com/Netflix/chaosmonkey/v2/spinnaker"
"github.com/SmartThingsOSS/frigga-go"
"os"
)
Expand Down
10 changes: 5 additions & 5 deletions command/schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"os"
"time"

"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/config"
"github.com/Netflix/chaosmonkey/deploy"
"github.com/Netflix/chaosmonkey/schedstore"
"github.com/Netflix/chaosmonkey/schedule"
"github.com/Netflix/chaosmonkey/v2"
"github.com/Netflix/chaosmonkey/v2/config"
"github.com/Netflix/chaosmonkey/v2/deploy"
"github.com/Netflix/chaosmonkey/v2/schedstore"
"github.com/Netflix/chaosmonkey/v2/schedule"
)

// Schedule executes the "schedule" command. This defines the schedule
Expand Down
12 changes: 6 additions & 6 deletions command/schedule_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (
"testing"
"time"

"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/config"
"github.com/Netflix/chaosmonkey/config/param"
"github.com/Netflix/chaosmonkey/constrainer"
"github.com/Netflix/chaosmonkey/mock"
"github.com/Netflix/chaosmonkey/schedule"
"github.com/Netflix/chaosmonkey/v2"
"github.com/Netflix/chaosmonkey/v2/config"
"github.com/Netflix/chaosmonkey/v2/config/param"
"github.com/Netflix/chaosmonkey/v2/constrainer"
"github.com/Netflix/chaosmonkey/v2/mock"
"github.com/Netflix/chaosmonkey/v2/schedule"
)

// TestSchedule verifies the schedule command generates a cron file with
Expand Down
8 changes: 4 additions & 4 deletions command/schedule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
"testing"
"time"

"github.com/Netflix/chaosmonkey/config"
"github.com/Netflix/chaosmonkey/config/param"
"github.com/Netflix/chaosmonkey/grp"
"github.com/Netflix/chaosmonkey/schedule"
"github.com/Netflix/chaosmonkey/v2/config"
"github.com/Netflix/chaosmonkey/v2/config/param"
"github.com/Netflix/chaosmonkey/v2/grp"
"github.com/Netflix/chaosmonkey/v2/schedule"
)

// addToSchedule schedules instanceId for termination at timeString
Expand Down
4 changes: 2 additions & 2 deletions command/terminate.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package command
import (
"log"

"github.com/Netflix/chaosmonkey/deps"
"github.com/Netflix/chaosmonkey/term"
"github.com/Netflix/chaosmonkey/v2/deps"
"github.com/Netflix/chaosmonkey/v2/term"
)

// Terminate executes the "terminate" command. This selects an instance
Expand Down
2 changes: 1 addition & 1 deletion config/monkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/spf13/pflag"
"github.com/spf13/viper"

"github.com/Netflix/chaosmonkey/config/param"
"github.com/Netflix/chaosmonkey/v2/config/param"
)

// Monkey is is a config implementation backed by viper
Expand Down
2 changes: 1 addition & 1 deletion config/monkey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package config

import (
"fmt"
"github.com/Netflix/chaosmonkey/config/param"
"github.com/Netflix/chaosmonkey/v2/config/param"
"testing"
)

Expand Down
6 changes: 3 additions & 3 deletions constrainer/constrainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
package constrainer

import (
"github.com/Netflix/chaosmonkey/config"
"github.com/Netflix/chaosmonkey/deps"
"github.com/Netflix/chaosmonkey/schedule"
"github.com/Netflix/chaosmonkey/v2/config"
"github.com/Netflix/chaosmonkey/v2/deps"
"github.com/Netflix/chaosmonkey/v2/schedule"
)

// NullConstrainer is a no-op constrainer
Expand Down
6 changes: 3 additions & 3 deletions decryptor/decryptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
package decryptor

import (
"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/config"
"github.com/Netflix/chaosmonkey/deps"
"github.com/Netflix/chaosmonkey/v2"
"github.com/Netflix/chaosmonkey/v2/config"
"github.com/Netflix/chaosmonkey/v2/deps"
"github.com/pkg/errors"
)

Expand Down
10 changes: 5 additions & 5 deletions deploy/eligible_instance_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"fmt"
"log"

"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/grp"
"github.com/Netflix/chaosmonkey/v2"
"github.com/Netflix/chaosmonkey/v2/grp"
)

// EligibleInstanceGroups returns a slice of InstanceGroups that represent
Expand All @@ -30,14 +30,14 @@ import (
// termination, not when considering groups of eligible instances.
//
// The way instances are divided into group will depend on
// * the grouping configuration for the app (cluster, stack, app)
// * whether regions are independent
// - the grouping configuration for the app (cluster, stack, app)
// - whether regions are independent
//
// The returned InstanceGroups are guaranteed to contain at least one instance
// each
//
// Preconditions:
// * app is enabled for Chaos Monkey
// - app is enabled for Chaos Monkey
func (app *App) EligibleInstanceGroups(cfg chaosmonkey.AppConfig) []grp.InstanceGroup {
if !cfg.Enabled {
log.Fatalf("app %s unexpectedly disabled", app.Name())
Expand Down
4 changes: 2 additions & 2 deletions deploy/eligible_instance_groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"reflect"
"testing"

"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/grp"
"github.com/Netflix/chaosmonkey/v2"
"github.com/Netflix/chaosmonkey/v2/grp"
)

type groupList []grp.InstanceGroup
Expand Down
10 changes: 5 additions & 5 deletions deps/deps.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
package deps

import (
"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/clock"
"github.com/Netflix/chaosmonkey/config"
"github.com/Netflix/chaosmonkey/deploy"
"github.com/Netflix/chaosmonkey/schedule"
"github.com/Netflix/chaosmonkey/v2"
"github.com/Netflix/chaosmonkey/v2/clock"
"github.com/Netflix/chaosmonkey/v2/config"
"github.com/Netflix/chaosmonkey/v2/deploy"
"github.com/Netflix/chaosmonkey/v2/schedule"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions eligible/eligible.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
package eligible

import (
"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/deploy"
"github.com/Netflix/chaosmonkey/grp"
"github.com/Netflix/chaosmonkey/v2"
"github.com/Netflix/chaosmonkey/v2/deploy"
"github.com/Netflix/chaosmonkey/v2/grp"
"github.com/SmartThingsOSS/frigga-go"
"github.com/pkg/errors"
"strings"
Expand Down
8 changes: 4 additions & 4 deletions eligible/eligible_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package eligible

import (
"github.com/Netflix/chaosmonkey"
D "github.com/Netflix/chaosmonkey/deploy"
"github.com/Netflix/chaosmonkey/grp"
"github.com/Netflix/chaosmonkey/mock"
"github.com/Netflix/chaosmonkey/v2"
D "github.com/Netflix/chaosmonkey/v2/deploy"
"github.com/Netflix/chaosmonkey/v2/grp"
"github.com/Netflix/chaosmonkey/v2/mock"
"sort"
"testing"
)
Expand Down
6 changes: 3 additions & 3 deletions eligible/instances_canary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ package eligible
import (
"testing"

D "github.com/Netflix/chaosmonkey/deploy"
"github.com/Netflix/chaosmonkey/grp"
"github.com/Netflix/chaosmonkey/mock"
D "github.com/Netflix/chaosmonkey/v2/deploy"
"github.com/Netflix/chaosmonkey/v2/grp"
"github.com/Netflix/chaosmonkey/v2/mock"
)

// Test that canaries are not considered eligible instances
Expand Down
8 changes: 4 additions & 4 deletions eligible/instances_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ package eligible
import (
"testing"

"github.com/Netflix/chaosmonkey"
D "github.com/Netflix/chaosmonkey/deploy"
"github.com/Netflix/chaosmonkey/grp"
"github.com/Netflix/chaosmonkey/mock"
"github.com/Netflix/chaosmonkey/v2"
D "github.com/Netflix/chaosmonkey/v2/deploy"
"github.com/Netflix/chaosmonkey/v2/grp"
"github.com/Netflix/chaosmonkey/v2/mock"
)

// mockDeployment returns a deploy.Deployment object mock for testing
Expand Down
6 changes: 3 additions & 3 deletions env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package env

import (
"github.com/Netflix/chaosmonkey"
"github.com/Netflix/chaosmonkey/config"
"github.com/Netflix/chaosmonkey/deps"
"github.com/Netflix/chaosmonkey/v2"
"github.com/Netflix/chaosmonkey/v2/config"
"github.com/Netflix/chaosmonkey/v2/deps"
)

// notTestEnv is an environment that does not report as a test env
Expand Down
Loading

0 comments on commit 5749420

Please sign in to comment.