Skip to content

Commit

Permalink
[issue 78] - Fixing HyperfoilOperatorProvisionerTest by setting the H…
Browse files Browse the repository at this point in the history
…yperfoil version that is matching the operator one (0.24.2)
  • Loading branch information
fabiobrz authored and rsearls committed Sep 29, 2023
1 parent d2d94b1 commit 13526e8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ extended easily, since Intersmash _provisioners_ are pluggable components.

| Product | Supported Operator version | Channel name | Supported product version | Repository | Notes |
|:--------------------------|:---------------------------|:-------------|:--------------------------|:----------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Hyperfoil | 0.21.0 | alpha | 0.23 | https://github.com/Hyperfoil/hyperfoil-operator | |
| Hyperfoil | 0.24.2 | alpha | 0.24.2 | https://github.com/Hyperfoil/hyperfoil-operator | We force the CRs version for the used Hyperfoil runtime to be 0.24.2, see https://github.com/Hyperfoil/hyperfoil-operator/issues/18 |
| Infinispan | 2.3.1 | 2.3.x | 14.0.6.Final | https://github.com/infinispan/infinispan-operator | |
| WildFly | 0.5.6 | alpha | 27.0.1.Final | https://github.com/wildfly/wildfly-operator | As available on https://operatorhub.io/operator/wildfly |
| Kafka provided by Strimzi | 0.37.0-SNAPSHOT | stable | 3.5.1 | https://github.com/strimzi/strimzi-kafka-operator | A snashot version of Strimzi API is used in order to be compatible with Fabric8 Kubernetes client artifacts |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
Expand All @@ -51,7 +50,6 @@
@CleanBeforeAll
@NotForProductizedExecutionProfile
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@Disabled("https://github.com/Intersmash/intersmash/issues/78")
public class HyperfoilOperatorProvisionerTest {
private static final Logger logger = LoggerFactory.getLogger(HyperfoilOperatorProvisionerTest.class);
private static final String NAME = "hyperfoil";
Expand All @@ -62,8 +60,11 @@ private static HyperfoilOperatorProvisioner initializeOperatorProvisioner() {
new HyperfoilOperatorApplication() {
@Override
public Hyperfoil getHyperfoil() {
return new HyperfoilBuilder(getName())
.build();
return new HyperfoilBuilder(
getName(),
// see https://github.com/Hyperfoil/hyperfoil-operator/issues/18, "latest" (default) would fail.
"0.24.2"
).build();
}

@Override
Expand Down
15 changes: 10 additions & 5 deletions testsuite/src/test/resources/k8s-hello-world.hf.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: k8s-hello-world
# List of agents the Controller should deploy
agents:
agent-one:
# This defines the agent using SSH connection to localhost, port 22
agent-one: localhost:22
# Another agent on localhost, this time defined using properties
agent-two:
host: localhost
port: 22
http:
host: !param HOST_URL
duration: 120s
usersPerSec: 2
duration: 120s
scenario:
- test:
- httpRequest:
GET: /
- test:
- httpRequest:
GET: /
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
import io.fabric8.kubernetes.api.model.ObjectMeta;

public final class HyperfoilBuilder {
private String name;
private final String name;
private final String version;

//TODO: complete with all hyperfoil ino

Expand All @@ -27,8 +28,9 @@ public final class HyperfoilBuilder {
*
* @param name resource object name
*/
public HyperfoilBuilder(String name) {
public HyperfoilBuilder(final String name, final String version) {
this.name = name;
this.version = version;
}

public Hyperfoil build() {
Expand All @@ -37,6 +39,7 @@ public Hyperfoil build() {
hyperfoil.getMetadata().setName(name);

HyperfoilSpec spec = new HyperfoilSpec();
spec.setVersion(version);
hyperfoil.setSpec(spec);

return hyperfoil;
Expand Down

0 comments on commit 13526e8

Please sign in to comment.