Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion intelliJRunConfigurations/Connectivity for test.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Connectivity for test" type="Application" factoryName="Application" folderName="Ditto testing :: Run configs">
<option name="ALTERNATIVE_JRE_PATH" value="17" />
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-25" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<envs>
<env name="AMQP10_CONSUMER_THROTTLING_ENABLED" value="true" />
Expand Down
2 changes: 1 addition & 1 deletion intelliJRunConfigurations/Gateway for test.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Gateway for test" type="Application" factoryName="Application" folderName="Ditto testing :: Run configs">
<option name="ALTERNATIVE_JRE_PATH" value="17" />
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-25" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<envs>
<env name="CHECK_API_TOKEN" value="true" />
Expand Down
2 changes: 1 addition & 1 deletion intelliJRunConfigurations/Policies for test.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Policies for test" type="Application" factoryName="Application" folderName="Ditto testing :: Run configs">
<option name="ALTERNATIVE_JRE_PATH" value="17" />
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-25" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<envs>
<env name="INSTANCE_INDEX" value="1" />
Expand Down
2 changes: 1 addition & 1 deletion intelliJRunConfigurations/Things for test.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Things for test" type="Application" factoryName="Application" folderName="Ditto testing :: Run configs">
<option name="ALTERNATIVE_JRE_PATH" value="17" />
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-25" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<envs>
<env name="INSTANCE_INDEX" value="1" />
Expand Down
2 changes: 1 addition & 1 deletion intelliJRunConfigurations/ThingsSearch for test.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ThingsSearch for test" type="Application" factoryName="Application" folderName="Ditto testing :: Run configs">
<option name="ALTERNATIVE_JRE_PATH" value="17" />
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-25" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<envs>
<env name="INSTANCE_INDEX" value="1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright (c) 2026 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.ditto.testing.system.gateway;

import org.eclipse.ditto.base.model.common.HttpStatus;
import org.eclipse.ditto.testing.common.*;
import org.eclipse.ditto.testing.common.categories.Acceptance;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.junit.Assume.assumeFalse;

/**
* Integration test for the authorization with Devops basic auth at the API Gateway.
Comment thread
abalarev marked this conversation as resolved.
*/
public final class GatewayDevopsBasicAuthorizationIT extends IntegrationTest {

private static final String RANDOM_NAMESPACE = ServiceEnvironment.createRandomDefaultNamespace();
private final CommonTestConfig testConfig;

public GatewayDevopsBasicAuthorizationIT() {
this.testConfig = CommonTestConfig.getInstance();
}

@Test
@Category(Acceptance.class)
public void retrieveAllConnectionIds() {
// WHEN
if (testConfig.isDevopsAuthEnabled()) {
connectionsClient()
.getConnectionIds()
.withBasicAuth(testConfig.getDevopsAuthUser(), testConfig.getDevopsAuthPassword())
.expectingHttpStatus(HttpStatus.OK)
.fire();
} else {
LOGGER.info("Devops auth is disabled. Test skipped.");
}
}

}