diff --git a/scw/client_option_test.go b/scw/client_option_test.go index 429fcf95b..d9c3a4d66 100644 --- a/scw/client_option_test.go +++ b/scw/client_option_test.go @@ -135,7 +135,7 @@ func TestClientOptions(t *testing.T) { s.token = auth.NewToken(testAccessKey, testSecretKey) s.defaultZone = &v }, - errStr: "scaleway-sdk-go: invalid default zone format 'invalid', available zones are: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2", + errStr: "scaleway-sdk-go: invalid default zone format 'invalid', available zones are: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2", }, } diff --git a/scw/locality.go b/scw/locality.go index 1b4d09153..7dbcfc401 100644 --- a/scw/locality.go +++ b/scw/locality.go @@ -27,6 +27,8 @@ const ( ZoneNlAms1 = Zone("nl-ams-1") // ZoneNlAms2 represents the nl-ams-2 zone ZoneNlAms2 = Zone("nl-ams-2") + // ZoneNlAms3 represents the nl-ams-3 zone + ZoneNlAms3 = Zone("nl-ams-3") // ZonePlWaw1 represents the pl-waw-1 zone ZonePlWaw1 = Zone("pl-waw-1") // ZonePlWaw2 represents the pl-waw-2 zone @@ -41,6 +43,7 @@ var ( ZoneFrPar3, ZoneNlAms1, ZoneNlAms2, + ZoneNlAms3, ZonePlWaw1, ZonePlWaw2, } @@ -109,7 +112,7 @@ func (region Region) GetZones() []Zone { case RegionFrPar: return []Zone{ZoneFrPar1, ZoneFrPar2, ZoneFrPar3} case RegionNlAms: - return []Zone{ZoneNlAms1, ZoneNlAms2} + return []Zone{ZoneNlAms1, ZoneNlAms2, ZoneNlAms3} case RegionPlWaw: return []Zone{ZonePlWaw1, ZonePlWaw2} default: diff --git a/scw/locality_test.go b/scw/locality_test.go index 99ea071bf..725a5ca0f 100644 --- a/scw/locality_test.go +++ b/scw/locality_test.go @@ -30,6 +30,10 @@ func TestParseZone(t *testing.T) { input: "nl-ams-2", expected: ZoneNlAms2, }, + { + input: "nl-ams-3", + expected: ZoneNlAms3, + }, { input: "par1", expected: ZoneFrPar1, @@ -45,17 +49,17 @@ func TestParseZone(t *testing.T) { { input: "fr-par", expected: "", - err: errors.New("bad zone format, available zones are: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2"), + err: errors.New("bad zone format, available zones are: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2"), }, { input: "fr-par-n", expected: "", - err: errors.New("bad zone format, available zones are: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2"), + err: errors.New("bad zone format, available zones are: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2"), }, { input: "fr-par-0", expected: "", - err: errors.New("bad zone format, available zones are: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, pl-waw-1, pl-waw-2"), + err: errors.New("bad zone format, available zones are: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2"), }, }