brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [1/2] brooklyn-ui git commit: Remove /v1 prefix from REST API
Date Thu, 18 Feb 2016 15:47:30 GMT
Repository: brooklyn-ui
Updated Branches:
  refs/heads/master b9ba6544d -> 68fb22627


Remove /v1 prefix from REST API


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/cf1c6a7f
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/cf1c6a7f
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/cf1c6a7f

Branch: refs/heads/master
Commit: cf1c6a7fbe9264ba44c3d518fd92427f233e6bf5
Parents: 72d57e1
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Mon Feb 15 17:17:19 2016 +0200
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Mon Feb 15 17:17:19 2016 +0200

----------------------------------------------------------------------
 src/test/javascript/specs/model/application-spec.js    | 10 +++++-----
 src/test/javascript/specs/model/entity-summary-spec.js |  2 +-
 src/test/javascript/specs/model/location-spec.js       |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/cf1c6a7f/src/test/javascript/specs/model/application-spec.js
----------------------------------------------------------------------
diff --git a/src/test/javascript/specs/model/application-spec.js b/src/test/javascript/specs/model/application-spec.js
index 1b76e3b..b03531d 100644
--- a/src/test/javascript/specs/model/application-spec.js
+++ b/src/test/javascript/specs/model/application-spec.js
@@ -31,7 +31,7 @@ define([
 
         it('loads all model properties defined in fixtures/application.json', function ()
{
             expect(application.get("status")).toEqual('STARTING')
-            expect(application.getLinkByName('self')).toEqual('/v1/applications/myapp')
+            expect(application.getLinkByName('self')).toEqual('/applications/myapp')
             expect(application.getLinkByName('entities')).toEqual('fixtures/entity-summary-list.json')
         })
 
@@ -40,7 +40,7 @@ define([
                 entity = new Entity.Model(applicationSpec.get("entities")[0])
 
             expect(applicationSpec.get("name")).toEqual('myapp')
-            expect(applicationSpec.get("locations")[0]).toEqual('/v1/locations/1')
+            expect(applicationSpec.get("locations")[0]).toEqual('/locations/1')
             expect(entity.get("name")).toEqual('Vanilla Java App')
         })
 
@@ -55,7 +55,7 @@ define([
 
         beforeEach(function () {
             spec = new Application.Spec
-            location = "/v1/locations/2"
+            location = "/locations/2"
             entity = new Entity.Model({name:'test'})
 
             spec.url = 'fixtures/application-spec.json'
@@ -64,7 +64,7 @@ define([
 
         it('loads the properties from fixtures/application-spec.json', function () {
             expect(spec.get("name")).toEqual('myapp')
-            expect(spec.get("locations")[0]).toEqual('/v1/locations/1')
+            expect(spec.get("locations")[0]).toEqual('/locations/1')
             expect(spec.get("entities").length).toBe(1)
         })
 
@@ -87,7 +87,7 @@ define([
             spec.addLocation(location)
             spyOn(spec, "trigger").andCallThrough()
 
-            spec.removeLocation('/v1/invalid/location')
+            spec.removeLocation('/invalid/location')
             expect(spec.trigger).not.toHaveBeenCalled()
             spec.removeLocation(location)
             expect(spec.trigger).toHaveBeenCalled()

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/cf1c6a7f/src/test/javascript/specs/model/entity-summary-spec.js
----------------------------------------------------------------------
diff --git a/src/test/javascript/specs/model/entity-summary-spec.js b/src/test/javascript/specs/model/entity-summary-spec.js
index 230b331..a2748c8 100644
--- a/src/test/javascript/specs/model/entity-summary-spec.js
+++ b/src/test/javascript/specs/model/entity-summary-spec.js
@@ -28,7 +28,7 @@ define(
 
             it('the collection element must be of type TomcatServer and have expected properties',
function () {
                 expect(eSummary.getLinkByName('catalog'))
-                    .toBe('/v1/catalog/entities/org.apache.brooklyn.entity.webapp.tomcat.TomcatServer')
+                    .toBe('/catalog/entities/org.apache.brooklyn.entity.webapp.tomcat.TomcatServer')
                 expect(eSummary.get("type")).toBe('org.apache.brooklyn.entity.webapp.tomcat.TomcatServer')
                 expect(eSummary.getLinkByName('sensors')).toBe('fixtures/sensor-summary-list.json')
                 expect(eSummary.getDisplayName()).toBe('TomcatServer:zQsqdXzi')

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/cf1c6a7f/src/test/javascript/specs/model/location-spec.js
----------------------------------------------------------------------
diff --git a/src/test/javascript/specs/model/location-spec.js b/src/test/javascript/specs/model/location-spec.js
index f72fc8c..3294e53 100644
--- a/src/test/javascript/specs/model/location-spec.js
+++ b/src/test/javascript/specs/model/location-spec.js
@@ -27,7 +27,7 @@ define([
     describe('model/location', function () {
         it("loads data from fixture file", function () {
             expect(location.get("spec")).toBe("localhost")
-            expect(location.getLinkByName("self")).toBe("/v1/locations/123")
+            expect(location.getLinkByName("self")).toBe("/locations/123")
         })
     })
 
@@ -43,8 +43,8 @@ define([
             expect(spec.get("name")).toEqual('localhost')
             expect(spec.get("spec")).toEqual('localhost')
             expect(spec.get("config")).toEqual({})
-            expect(spec.hasSelfUrl('/v1/locations/123')).toBeTruthy()
-            expect(spec.getLinkByName("self")).toEqual('/v1/locations/123')
+            expect(spec.hasSelfUrl('/locations/123')).toBeTruthy()
+            expect(spec.getLinkByName("self")).toEqual('/locations/123')
         })
 
         var locationCollection = new Location.Collection()


Mime
View raw message