Skip to content

Commit 418975b

Browse files
committed
Fix unit tests, remove remaining dockerui references.
1 parent b2005eb commit 418975b

13 files changed

+34
-24
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ UI For Docker is a web interface for the Docker Remote API. The goal is to prov
1919

2020

2121

22-
Bind mounting the Unix socket into the UI For Docker container is much more secure than exposing your docker daemon over TCP. The `--privileged` flag is required for hosts using SELinux. You should still secure your UI For Docker instance behind some type of auth. Directions for using Nginx auth are [here](https://github.com/kevana/ui-for-docker/wiki/Dockerui-with-Nginx-HTTP-Auth).
22+
Bind mounting the Unix socket into the UI For Docker container is much more secure than exposing your docker daemon over TCP. The `--privileged` flag is required for hosts using SELinux. You should still secure your UI For Docker instance behind some type of auth. Directions for using Nginx auth are [here](https://github.com/kevana/ui-for-docker/wiki/UI-for-Docker-with-Nginx-HTTP-Auth).
2323

2424
### Specify socket to connect to Docker daemon
2525

Diff for: app/app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
angular.module('uifordocker', [
22
'uifordocker.templates',
33
'ngRoute',
4-
'dockerui.services',
5-
'dockerui.filters',
4+
'uifordocker.services',
5+
'uifordocker.filters',
66
'masthead',
77
'footer',
88
'dashboard',

Diff for: app/shared/filters.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
angular.module('dockerui.filters', [])
1+
angular.module('uifordocker.filters', [])
22
.filter('truncate', function () {
33
'use strict';
44
return function (text, length, end) {

Diff for: app/shared/services.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
angular.module('dockerui.services', ['ngResource', 'ngSanitize'])
1+
angular.module('uifordocker.services', ['ngResource', 'ngSanitize'])
22
.factory('Container', ['$resource', 'Settings', function ContainerFactory($resource, Settings) {
33
'use strict';
44
// Resource for interacting with the docker containers

Diff for: test/unit/app/components/containerController.spec.js

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
describe('ContainerController', function () {
22
var $scope, $httpBackend, mockContainer, $routeParams;
33

4-
beforeEach(module('dockerui'));
4+
beforeEach(module('uifordocker'));
55

66

77
beforeEach(inject(function ($rootScope, $controller, _$routeParams_) {
@@ -20,10 +20,14 @@ describe('ContainerController', function () {
2020

2121
function expectGetContainer() {
2222
$httpBackend.expectGET('dockerapi/containers/json').respond({
23-
'Created': 1421817232,
24-
'id': 'b17882378cee8ec0136f482681b764cca430befd52a9bfd1bde031f49b8bba9f',
25-
'Image': 'dockerui:latest',
26-
'Name': '/dockerui'
23+
Created: 1421817232,
24+
id: 'b17882378cee8ec0136f482681b764cca430befd52a9bfd1bde031f49b8bba9f',
25+
Image: 'ui-for-docker:latest',
26+
Name: '/ui-for-docker',
27+
Config: {},
28+
HostConfig: {
29+
Binds: []
30+
}
2731
});
2832
}
2933

@@ -33,8 +37,8 @@ describe('ContainerController', function () {
3337
$scope.container = {
3438
'Created': 1421817232,
3539
'id': 'b17882378cee8ec0136f482681b764cca430befd52a9bfd1bde031f49b8bba9f',
36-
'Image': 'dockerui:latest',
37-
'Name': '/dockerui'
40+
'Image': 'ui-for-docker:latest',
41+
'Name': '/ui-for-docker'
3842
};
3943
$scope.container.newContainerName = "newName";
4044

Diff for: test/unit/app/components/containerTopController.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
describe("ContainerTopController", function () {
22
var $scope, $httpBackend, $routeParams;
33

4-
beforeEach(angular.mock.module('dockerui'));
4+
beforeEach(angular.mock.module('uifordocker'));
55

66
beforeEach(inject(function (_$rootScope_, _$httpBackend_, $controller, _$routeParams_) {
77
$scope = _$rootScope_.$new();

Diff for: test/unit/app/components/networkController.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
describe('NetworkController', function () {
22
var $scope, $httpBackend, $routeParams;
33

4-
beforeEach(module('dockerui'));
4+
beforeEach(module('uifordocker'));
55
beforeEach(inject(function (_$httpBackend_, $controller, _$routeParams_) {
66
$scope = {};
77
$httpBackend = _$httpBackend_;

Diff for: test/unit/app/components/networksController.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
describe('NetworksController', function () {
22
var $scope, $httpBackend, $routeParams;
33

4-
beforeEach(module('dockerui'));
4+
beforeEach(module('uifordocker'));
55
beforeEach(inject(function (_$httpBackend_, $controller, _$routeParams_) {
66
$scope = {};
77
$httpBackend = _$httpBackend_;

Diff for: test/unit/app/components/startContainerController.spec.js

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
describe('startContainerController', function () {
22
var scope, $location, createController, mockContainer, $httpBackend;
33

4-
beforeEach(angular.mock.module('dockerui'));
4+
beforeEach(angular.mock.module('uifordocker'));
55

66
beforeEach(inject(function ($rootScope, $controller, _$location_) {
77
$location = _$location_;
@@ -20,11 +20,11 @@ describe('startContainerController', function () {
2020
}));
2121
function expectGetContainers() {
2222
$httpBackend.expectGET('dockerapi/containers/json?all=1').respond([{
23-
'Command': './dockerui -e /docker.sock',
23+
'Command': './ui-for-docker -e /docker.sock',
2424
'Created': 1421817232,
2525
'Id': 'b17882378cee8ec0136f482681b764cca430befd52a9bfd1bde031f49b8bba9f',
26-
'Image': 'dockerui:latest',
27-
'Names': ['/dockerui'],
26+
'Image': 'ui-for-docker:latest',
27+
'Names': ['/ui-for-docker'],
2828
'Ports': [{
2929
'IP': '0.0.0.0',
3030
'PrivatePort': 9000,
@@ -199,9 +199,15 @@ describe('startContainerController', function () {
199199
}],
200200
LxcConf: {'lxc.utsname': 'docker'},
201201
ExtraHosts: ['hostname:127.0.0.1'],
202+
PublishAllPorts: true,
203+
Privileged: true,
202204
RestartPolicy: {name: 'always', MaximumRetryCount: 5}
203205
},
204-
name: 'container-name'
206+
name: 'container-name',
207+
NetworkDisabled: true,
208+
Tty: true,
209+
OpenStdin: true,
210+
StdinOnce: true
205211
};
206212

207213
expectGetContainers();

Diff for: test/unit/app/components/statsController.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
describe("StatsController", function () {
22
var $scope, $httpBackend, $routeParams;
33

4-
beforeEach(angular.mock.module('dockerui'));
4+
beforeEach(angular.mock.module('uifordocker'));
55

66
beforeEach(inject(function (_$rootScope_, _$httpBackend_, $controller, _$routeParams_) {
77
$scope = _$rootScope_.$new();

Diff for: test/unit/app/components/volumesController.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
describe('VolumesController', function () {
22
var $scope, $httpBackend, $routeParams;
33

4-
beforeEach(module('dockerui'));
4+
beforeEach(module('uifordocker'));
55
beforeEach(inject(function (_$httpBackend_, $controller, _$routeParams_) {
66
$scope = {};
77
$httpBackend = _$httpBackend_;

Diff for: test/unit/app/shared/filters.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
describe('filters', function () {
2-
beforeEach(module('dockerui.filters'));
2+
beforeEach(module('uifordocker.filters'));
33

44
describe('truncate', function () {
55
it('should truncate the string to 10 characters ending in "..." by default', inject(function (truncateFilter) {

Diff for: test/unit/karma.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ files = [
77
JASMINE_ADAPTER,
88
'dist/angular.js',
99
'dist/vendor.js',
10-
'dist/dockerui.js',
10+
'dist/uifordocker.js',
1111
'bower_components/angular-mocks/angular-mocks.js',
1212
'test/unit/**/*.spec.js'
1313
];

0 commit comments

Comments
 (0)