|
|
@@ -19,6 +19,7 @@ func TestAthenaConfiguration_Validate(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -30,6 +31,19 @@ func TestAthenaConfiguration_Validate(t *testing.T) {
|
|
|
expected: nil,
|
|
|
},
|
|
|
"valid config service account": {
|
|
|
+ config: AthenaConfiguration{
|
|
|
+ Bucket: "bucket",
|
|
|
+ Region: "region",
|
|
|
+ Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
+ Table: "table",
|
|
|
+ Workgroup: "workgroup",
|
|
|
+ Account: "account",
|
|
|
+ Authorizer: &ServiceAccount{},
|
|
|
+ },
|
|
|
+ expected: nil,
|
|
|
+ },
|
|
|
+ "valid missing catalog": {
|
|
|
config: AthenaConfiguration{
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
@@ -46,6 +60,7 @@ func TestAthenaConfiguration_Validate(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -60,6 +75,7 @@ func TestAthenaConfiguration_Validate(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -72,6 +88,7 @@ func TestAthenaConfiguration_Validate(t *testing.T) {
|
|
|
Bucket: "",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -84,6 +101,7 @@ func TestAthenaConfiguration_Validate(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -96,6 +114,7 @@ func TestAthenaConfiguration_Validate(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -109,6 +128,7 @@ func TestAthenaConfiguration_Validate(t *testing.T) {
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
Table: "",
|
|
|
+ Catalog: "catalog",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
Authorizer: &ServiceAccount{},
|
|
|
@@ -120,6 +140,7 @@ func TestAthenaConfiguration_Validate(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "",
|
|
|
Account: "account",
|
|
|
@@ -132,6 +153,7 @@ func TestAthenaConfiguration_Validate(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "",
|
|
|
@@ -170,6 +192,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -182,6 +205,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -197,6 +221,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -209,6 +234,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -221,6 +247,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -230,6 +257,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -242,6 +270,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -251,6 +280,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -263,6 +293,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -275,6 +306,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -287,6 +319,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -299,6 +332,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket2",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -314,6 +348,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -326,6 +361,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region2",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -341,6 +377,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -353,6 +390,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database2",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -368,6 +406,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -380,6 +419,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table2",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -390,11 +430,41 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
},
|
|
|
expected: false,
|
|
|
},
|
|
|
+ "different catalog": {
|
|
|
+ left: AthenaConfiguration{
|
|
|
+ Bucket: "bucket",
|
|
|
+ Region: "region",
|
|
|
+ Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
+ Table: "table",
|
|
|
+ Workgroup: "workgroup",
|
|
|
+ Account: "account",
|
|
|
+ Authorizer: &AccessKey{
|
|
|
+ ID: "id",
|
|
|
+ Secret: "secret",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ right: &AthenaConfiguration{
|
|
|
+ Bucket: "bucket",
|
|
|
+ Region: "region",
|
|
|
+ Database: "database",
|
|
|
+ Catalog: "catalog2",
|
|
|
+ Table: "table",
|
|
|
+ Workgroup: "workgroup",
|
|
|
+ Account: "account",
|
|
|
+ Authorizer: &AccessKey{
|
|
|
+ ID: "id",
|
|
|
+ Secret: "secret",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ expected: false,
|
|
|
+ },
|
|
|
"different workgroup": {
|
|
|
left: AthenaConfiguration{
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -407,6 +477,7 @@ func TestAthenaConfiguration_Equals(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup2",
|
|
|
Account: "account",
|
|
|
@@ -487,6 +558,7 @@ func TestAthenaConfiguration_JSON(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -502,6 +574,7 @@ func TestAthenaConfiguration_JSON(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -513,6 +586,7 @@ func TestAthenaConfiguration_JSON(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -530,6 +604,7 @@ func TestAthenaConfiguration_JSON(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -544,6 +619,7 @@ func TestAthenaConfiguration_JSON(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|
|
|
@@ -558,6 +634,7 @@ func TestAthenaConfiguration_JSON(t *testing.T) {
|
|
|
Bucket: "bucket",
|
|
|
Region: "region",
|
|
|
Database: "database",
|
|
|
+ Catalog: "catalog",
|
|
|
Table: "table",
|
|
|
Workgroup: "workgroup",
|
|
|
Account: "account",
|