Skip to content

Commit 68b533f

Browse files
committed
added/fixed version of image issue
1 parent 930e0d5 commit 68b533f

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/main/java/xyz/fabiano/spring/localstack/annotation/SpringLocalstackProperties.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@
2626
String[] extraOptions() default {};
2727

2828
String region() default "us-east-1";
29+
30+
String version() default "latest";
2931
}

src/main/java/xyz/fabiano/spring/localstack/junit/SpringLocalstackDockerRunner.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public void run(RunNotifier notifier) {
3434
builder.pullingNewImages(p.pullNewImage());
3535
builder.withOptions(options(p));
3636
builder.withRegion(p.region());
37+
builder.withVersion(p.version());
3738
});
3839

3940
LocalstackDocker docker = builder.build();

src/main/java/xyz/fabiano/spring/localstack/legacy/command/PullCommand.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
public class PullCommand extends Command {
66

77
private static final int PULL_COMMAND_TIMEOUT_MINUTES = 10;
8-
private static final String LATEST_TAG = "latest";
98

109
private final String imageName;
1110

@@ -15,7 +14,6 @@ public PullCommand(String imageName) {
1514

1615

1716
public void execute() {
18-
String image = String.format("%s:%s", imageName, LATEST_TAG);
19-
dockerExe.execute(Arrays.asList("pull", image), PULL_COMMAND_TIMEOUT_MINUTES);
17+
dockerExe.execute(Arrays.asList("pull", imageName), PULL_COMMAND_TIMEOUT_MINUTES);
2018
}
2119
}

src/test/java/xyz/fabiano/spring/localstack/junit/SpringLocalstackDockerRunnerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import static xyz.fabiano.spring.localstack.LocalstackService.*;
4141

4242
@RunWith(SpringLocalstackDockerRunner.class)
43-
@SpringLocalstackProperties(services = {DYNAMO, SQS, KINESIS, S3})
43+
@SpringLocalstackProperties(services = {DYNAMO, SQS, KINESIS, S3}, version = "0.9.1", pullNewImage = true)
4444
@ContextConfiguration(classes = SpringTestContext.class)
4545
public class SpringLocalstackDockerRunnerTest {
4646

0 commit comments

Comments
 (0)