Skip to content

Commit fb88139

Browse files
committed
fix(it): automatically pick up the latest container version
1 parent 5ecb7e5 commit fb88139

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

src/it/java/io/weaviate/containers/Weaviate.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
public class Weaviate extends WeaviateContainer {
2828
public static final String DOCKER_IMAGE = "semitechnologies/weaviate";
29-
public static final String LATEST_VERSION = Version.V135.semver.toString();
29+
public static final String LATEST_VERSION = Version.latest().semver.toString();
3030
public static final String VERSION;
3131

3232
static {
@@ -41,17 +41,30 @@ public enum Version {
4141
V132(1, 32, 24),
4242
V133(1, 33, 11),
4343
V134(1, 34, 7),
44-
V135(1, 35, 2);
44+
V135(1, 35, 2),
45+
V136(1, 36, "0-rc.0");
4546

4647
public final SemanticVersion semver;
4748

4849
private Version(int major, int minor, int patch) {
4950
this.semver = new SemanticVersion(major, minor, patch);
5051
}
5152

53+
private Version(int major, int minor, String patch) {
54+
this.semver = new SemanticVersion(major, minor, patch);
55+
}
56+
5257
public void orSkip() {
5358
ConcurrentTest.requireAtLeast(this);
5459
}
60+
61+
public static Version latest() {
62+
Version[] versions = Version.class.getEnumConstants();
63+
if (versions == null) {
64+
throw new IllegalStateException("No versions are defined");
65+
}
66+
return versions[versions.length - 1];
67+
}
5568
}
5669

5770
/**

0 commit comments

Comments
 (0)