Skip to content

Commit

Permalink
Added AuthConfigTest class
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos_Gonzalez_Mayedo <alemayed@amazon.com>
  • Loading branch information
Marcos_Gonzalez_Mayedo committed Jun 21, 2023
1 parent c04e490 commit a5c3237
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
public class AuthConfig {
@JsonProperty("region")
@NotEmpty
private String region = "";
private String region = "default";

@JsonProperty("role_arn")
@NotEmpty
private String role_arn = "";
private String role_arn = "default";

public String getRegion() {
return region;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.opensearch.dataprepper.plugins.sink.configuration;

import org.junit.jupiter.api.Test;
import org.opensearch.dataprepper.plugins.sink.AuthConfig;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

public class AuthConfigTest {
@Test
void check_default_region_test() {
assertThat(new AuthConfig().getRegion(), equalTo("default"));
}

@Test
void check_default_role_test() {
assertThat(new AuthConfig().getRole_arn(), equalTo("default"));
}
}

0 comments on commit a5c3237

Please sign in to comment.