databricks-sdk-java icon indicating copy to clipboard operation
databricks-sdk-java copied to clipboard

`@EnvContext` is ignored when applied on the method level

Open nfx opened this issue 2 years ago • 0 comments

should be possible to set env context

@ExtendWith(EnvTest.class)
public class UsersIT2 {
  @Test
  @EnvContext("account")
  void lists(DatabricksAccount a) {
    Iterable<User> list = a.users().list(new ListAccountUsersRequest());

    java.util.List<User> all = CollectionUtils.asList(list);

    CollectionUtils.assertUnique(all);
  }

  @Test
  @EnvContext("workspace")
  void lists(DatabricksWorkspace w) {
    Iterable<User> list = w.users().list(new ListUsersRequest());

    java.util.List<User> all = CollectionUtils.asList(list);

    CollectionUtils.assertUnique(all);
  }
}

nfx avatar May 08 '23 13:05 nfx