소스 검색

fix test now that docker compute is in the picture

tags/v1.5.4
Jonathan Cobb 3 년 전
부모
커밋
2e774e21ad
6개의 변경된 파일15개의 추가작업 그리고 12개의 파일을 삭제
  1. +2
    -2
      bubble-server/src/main/java/bubble/cloud/compute/docker/DockerComputeDriver.java
  2. +8
    -0
      bubble-server/src/main/java/bubble/cloud/geoLocation/GeoLocation.java
  3. +2
    -3
      bubble-server/src/main/java/bubble/model/cloud/RegionalServiceDriver.java
  4. +1
    -1
      bubble-server/src/main/resources/messages
  5. +1
    -5
      bubble-server/src/test/java/bubble/test/filter/FlexRouterProximityComparatorTest.java
  6. +1
    -1
      bubble-server/src/test/resources/models/tests/network/network_regions.json

+ 2
- 2
bubble-server/src/main/java/bubble/cloud/compute/docker/DockerComputeDriver.java 파일 보기

@@ -122,10 +122,10 @@ public class DockerComputeDriver extends ComputeServiceDriverBase {
.withDockerHost(host)
.withDockerTlsVerify(tlsVerify)
.withDockerCertPath(certPath)
.withRegistryUrl(creds.getParam("registryUrl"))
.withRegistryUsername(creds.getParam("registryUsername"))
.withRegistryPassword(creds.getParam("registryPassword"))
.withRegistryEmail(creds.getParam("registryEmail"))
.withRegistryUrl(creds.getParam("registryUrl"))
.withRegistryPassword(creds.getParam("registryPassword"))
.build();

final DockerHttpClient client = new ZerodepDockerHttpClient.Builder()


+ 8
- 0
bubble-server/src/main/java/bubble/cloud/geoLocation/GeoLocation.java 파일 보기

@@ -23,6 +23,14 @@ import static org.cobbzilla.util.daemon.ZillaRuntime.*;
@NoArgsConstructor @Accessors(chain=true) @ToString(of={"lat", "lon"}) @OpenApiSchema
public class GeoLocation {

public static final GeoLocation GEO_NEW_YORK = new GeoLocation().setLat("40.661").setLon("-73.944");
public static final GeoLocation GEO_SINGAPORE = new GeoLocation().setLat("1.283333").setLon("103.833333");
public static final GeoLocation GEO_LONDON = new GeoLocation().setLat("51.507222").setLon("-0.1275");
public static final GeoLocation GEO_ATLANTA = new GeoLocation().setLat("33.755").setLon("-84.39");
public static final GeoLocation GEO_CHICAGO = new GeoLocation().setLat("41.881944").setLon("-87.627778");

public static final GeoLocation DEFAULT_GEO_LOCATION = GEO_ATLANTA;

public static final GeoLocation NULL_LOCATION = new GeoLocation().setLat("-1.0").setLon("-1.0");
public static final double INVALID_LOCATION = -1.0;



+ 2
- 3
bubble-server/src/main/java/bubble/model/cloud/RegionalServiceDriver.java 파일 보기

@@ -16,8 +16,7 @@ import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;

import static bubble.cloud.geoLocation.GeoLocation.INVALID_LOCATION;
import static bubble.cloud.geoLocation.GeoLocation.NULL_LOCATION;
import static bubble.cloud.geoLocation.GeoLocation.*;
import static java.util.Comparator.comparingDouble;
import static org.cobbzilla.util.daemon.ZillaRuntime.shortError;

@@ -75,7 +74,7 @@ public interface RegionalServiceDriver {
if (latLonIsValid && latitude >= 0 && longitude >= 0) {
r.setDistance(latitude, longitude);
} else {
r.setDistance(0);
r.setDistance(DEFAULT_GEO_LOCATION.getLatitude(), DEFAULT_GEO_LOCATION.getLongitude());
}
allRegions.add(r);
}


+ 1
- 1
bubble-server/src/main/resources/messages

@@ -1 +1 @@
Subproject commit 159e6b71475c261c68555dbe776193fdd6e06cdb
Subproject commit a4c4042df88abfd6a02e5dfd30f3ca8f883d8fbf

+ 1
- 5
bubble-server/src/test/java/bubble/test/filter/FlexRouterProximityComparatorTest.java 파일 보기

@@ -13,16 +13,12 @@ import org.junit.Test;

import java.util.*;

import static bubble.cloud.geoLocation.GeoLocation.*;
import static org.junit.Assert.assertEquals;

public class FlexRouterProximityComparatorTest {

public static final GeoLocation GEO_NULL = new GeoLocation().setLat(null).setLon(null);
public static final GeoLocation GEO_NEW_YORK = new GeoLocation().setLat("40.661").setLon("-73.944");
public static final GeoLocation GEO_SINGAPORE = new GeoLocation().setLat("1.283333").setLon("103.833333");
public static final GeoLocation GEO_LONDON = new GeoLocation().setLat("51.507222").setLon("-0.1275");
public static final GeoLocation GEO_ATLANTA = new GeoLocation().setLat("33.755").setLon("-84.39");
public static final GeoLocation GEO_CHICAGO = new GeoLocation().setLat("41.881944").setLon("-87.627778");

private static FlexRouter router(int port) {
return new FlexRouter().setPort(port).setIp("127.0.0."+port);


+ 1
- 1
bubble-server/src/test/resources/models/tests/network/network_regions.json 파일 보기

@@ -5,7 +5,7 @@
"response": {
"store": "computeClouds",
"check": [
{"condition": "json.length == 3"}
{"condition": "json.length == 4"}
]
}
},


불러오는 중...
취소
저장