Skip to content

Enable kustomize in kubectl #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
- JOB=ci-checks
- JOB=unit-core BROWSER_PROVIDER=saucelabs
- JOB=unit-jquery BROWSER_PROVIDER=saucelabs
- JOB=unit-modules BROWSER_PROVIDER=saucelabs
- JOB=docs-app BROWSER_PROVIDER=saucelabs
- JOB=e2e TEST_TARGET=jqlite BROWSER_PROVIDER=saucelabs
- JOB=e2e TEST_TARGET=jquery BROWSER_PROVIDER=saucelabs
Expand Down
12 changes: 4 additions & 8 deletions karma-shared.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,11 @@ module.exports = function(config, specificOptions) {
'SL_Safari-1': {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.12',
version: 'latest-1'
},
'SL_Safari': {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.12',
version: 'latest'
},
'SL_IE_9': {
Expand Down Expand Up @@ -104,17 +102,15 @@ module.exports = function(config, specificOptions) {
platform: 'Windows 10',
version: 'latest-1'
},
'SL_iOS_10': {
'SL_iOS': {
base: 'SauceLabs',
browserName: 'iphone',
platform: 'OS X 10.12',
version: '10.3'
version: 'latest'
},
'SL_iOS_11': {
'SL_iOS-1': {
base: 'SauceLabs',
browserName: 'iphone',
platform: 'OS X 10.12',
version: '11.2'
version: 'latest-1'
},

'BS_Chrome': {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"jquery": "3.2.1",
"jquery-2.1": "npm:[email protected]",
"jquery-2.2": "npm:[email protected]",
"karma": "^2.0.4",
"karma": "3.1.1",
"karma-browserstack-launcher": "^1.3.0",
"karma-chrome-launcher": "^2.2.0",
"karma-edge-launcher": "^0.4.2",
Expand Down
7 changes: 5 additions & 2 deletions scripts/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SAUCE_ACCESS_KEY=$(echo "$SAUCE_ACCESS_KEY" | rev)
BROWSERS="SL_Chrome,SL_Chrome-1,\
SL_Firefox,SL_Firefox-1,\
SL_Safari,SL_Safari-1,\
SL_iOS_10,SL_iOS_11,\
SL_iOS,SL_iOS-1,\
SL_IE_9,SL_IE_10,SL_IE_11,\
SL_EDGE"

Expand All @@ -35,13 +35,15 @@ case "$JOB" in
"unit-core")
grunt test:promises-aplus
grunt test:jqlite --browsers="$BROWSERS" --reporters=spec
grunt test:modules --browsers="$BROWSERS" --reporters=spec
;;
"unit-jquery")
grunt test:jquery --browsers="$BROWSERS" --reporters=spec
grunt test:jquery-2.2 --browsers="$BROWSERS" --reporters=spec
grunt test:jquery-2.1 --browsers="$BROWSERS" --reporters=spec
;;
"unit-modules")
grunt test:modules --browsers="$BROWSERS" --reporters=spec
;;
"docs-app")
grunt tests:docs --browsers="$BROWSERS" --reporters=spec
grunt test:travis-protractor --specs="docs/app/e2e/**/*.scenario.js"
Expand Down Expand Up @@ -102,6 +104,7 @@ case "$JOB" in
'ci-checks',\
'unit-core',\
'unit-jquery',\
'unit-modules',\
'docs-app',\
'e2e',\
or\
Expand Down
7 changes: 1 addition & 6 deletions src/Angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -1696,13 +1696,8 @@ function angularInit(element, bootstrap) {
});
if (appElement) {
if (!isAutoBootstrapAllowed) {
try {
window.console.error('AngularJS: disabling automatic bootstrap. <script> protocol indicates ' +
window.console.error('AngularJS: disabling automatic bootstrap. <script> protocol indicates ' +
'an extension, document.location.href does not match.');
} catch (e) {
// Support: Safari 11 w/ Webdriver
// The console.error will throw and make the test fail
}
return;
}
config.strictDi = getNgAttribute(appElement, 'strict-di') !== null;
Expand Down
3 changes: 3 additions & 0 deletions src/ng/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ function Browser(window, document, $log, $sniffer, $$taskTrackerFactory) {
if (url) {
var sameState = lastHistoryState === state;

// Normalize the inputted URL
url = urlResolve(url).href;

// Don't change anything if previous and current URLs and states match. This also prevents
// IE<10 from getting into redirect loop when in LocationHashbangInHtml5Url mode.
// See https://github.com/angular/angular.js/commit/ffb2701
Expand Down
118 changes: 93 additions & 25 deletions test/ng/browserSpecs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ function MockWindow(options) {
}
var events = {};
var timeouts = this.timeouts = [];
var locationHref = 'http://server/';
var committedHref = 'http://server/';
var locationHref = window.document.createElement('a');
var committedHref = window.document.createElement('a');
locationHref.href = committedHref.href = 'http://server/';
var mockWindow = this;
var msie = options.msie;
var ieState;
Expand Down Expand Up @@ -60,28 +61,28 @@ function MockWindow(options) {

this.location = {
get href() {
return committedHref;
return committedHref.href;
},
set href(value) {
locationHref = value;
locationHref.href = value;
mockWindow.history.state = null;
historyEntriesLength++;
if (!options.updateAsync) this.flushHref();
},
get hash() {
return getHash(committedHref);
return getHash(committedHref.href);
},
set hash(value) {
locationHref = replaceHash(locationHref, value);
locationHref.href = replaceHash(locationHref.href, value);
if (!options.updateAsync) this.flushHref();
},
replace: function(url) {
locationHref = url;
locationHref.href = url;
mockWindow.history.state = null;
if (!options.updateAsync) this.flushHref();
},
flushHref: function() {
committedHref = locationHref;
committedHref.href = locationHref.href;
}
};

Expand All @@ -91,13 +92,13 @@ function MockWindow(options) {
historyEntriesLength++;
},
replaceState: function(state, title, url) {
locationHref = url;
if (!options.updateAsync) committedHref = locationHref;
locationHref.href = url;
if (!options.updateAsync) committedHref.href = locationHref.href;
mockWindow.history.state = copy(state);
if (!options.updateAsync) this.flushHref();
},
flushHref: function() {
committedHref = locationHref;
committedHref.href = locationHref.href;
}
};
// IE 10-11 deserialize history.state on each read making subsequent reads
Expand Down Expand Up @@ -398,26 +399,26 @@ describe('browser', function() {

it('should return current location.href', function() {
fakeWindow.location.href = 'http://test.com';
expect(browser.url()).toEqual('http://test.com');
expect(browser.url()).toEqual('http://test.com/');

fakeWindow.location.href = 'https://another.com';
expect(browser.url()).toEqual('https://another.com');
expect(browser.url()).toEqual('https://another.com/');
});

it('should strip an empty hash fragment', function() {
fakeWindow.location.href = 'http://test.com#';
expect(browser.url()).toEqual('http://test.com');
fakeWindow.location.href = 'http://test.com/#';
expect(browser.url()).toEqual('http://test.com/');

fakeWindow.location.href = 'https://another.com#foo';
expect(browser.url()).toEqual('https://another.com#foo');
fakeWindow.location.href = 'https://another.com/#foo';
expect(browser.url()).toEqual('https://another.com/#foo');
});

it('should use history.pushState when available', function() {
sniffer.history = true;
browser.url('http://new.org');

expect(pushState).toHaveBeenCalledOnce();
expect(pushState.calls.argsFor(0)[2]).toEqual('http://new.org');
expect(pushState.calls.argsFor(0)[2]).toEqual('http://new.org/');

expect(replaceState).not.toHaveBeenCalled();
expect(locationReplace).not.toHaveBeenCalled();
Expand All @@ -429,7 +430,7 @@ describe('browser', function() {
browser.url('http://new.org', true);

expect(replaceState).toHaveBeenCalledOnce();
expect(replaceState.calls.argsFor(0)[2]).toEqual('http://new.org');
expect(replaceState.calls.argsFor(0)[2]).toEqual('http://new.org/');

expect(pushState).not.toHaveBeenCalled();
expect(locationReplace).not.toHaveBeenCalled();
Expand All @@ -440,7 +441,7 @@ describe('browser', function() {
sniffer.history = false;
browser.url('http://new.org');

expect(fakeWindow.location.href).toEqual('http://new.org');
expect(fakeWindow.location.href).toEqual('http://new.org/');

expect(pushState).not.toHaveBeenCalled();
expect(replaceState).not.toHaveBeenCalled();
Expand Down Expand Up @@ -473,7 +474,7 @@ describe('browser', function() {
sniffer.history = false;
browser.url('http://new.org', true);

expect(locationReplace).toHaveBeenCalledWith('http://new.org');
expect(locationReplace).toHaveBeenCalledWith('http://new.org/');

expect(pushState).not.toHaveBeenCalled();
expect(replaceState).not.toHaveBeenCalled();
Expand Down Expand Up @@ -507,9 +508,9 @@ describe('browser', function() {
it('should not set URL when the URL is already set', function() {
var current = fakeWindow.location.href;
sniffer.history = false;
fakeWindow.location.href = 'dontchange';
fakeWindow.location.href = 'http://dontchange/';
browser.url(current);
expect(fakeWindow.location.href).toBe('dontchange');
expect(fakeWindow.location.href).toBe('http://dontchange/');
});

it('should not read out location.href if a reload was triggered but still allow to change the url', function() {
Expand Down Expand Up @@ -688,6 +689,73 @@ describe('browser', function() {
expect(replaceState).not.toHaveBeenCalled();
expect(locationReplace).not.toHaveBeenCalled();
});

it('should not do pushState with a URL using relative protocol', function() {
browser.url('http://server/');

pushState.calls.reset();
replaceState.calls.reset();
locationReplace.calls.reset();

browser.url('//server');
expect(pushState).not.toHaveBeenCalled();
expect(replaceState).not.toHaveBeenCalled();
expect(locationReplace).not.toHaveBeenCalled();
});

it('should not do pushState with a URL only adding a trailing slash after domain', function() {
// A domain without a trailing /
browser.url('http://server');

pushState.calls.reset();
replaceState.calls.reset();
locationReplace.calls.reset();

// A domain from something such as window.location.href with a trailing slash
browser.url('http://server/');
expect(pushState).not.toHaveBeenCalled();
expect(replaceState).not.toHaveBeenCalled();
expect(locationReplace).not.toHaveBeenCalled();
});

it('should not do pushState with a URL only removing a trailing slash after domain', function() {
// A domain from something such as window.location.href with a trailing slash
browser.url('http://server/');

pushState.calls.reset();
replaceState.calls.reset();
locationReplace.calls.reset();

// A domain without a trailing /
browser.url('http://server');
expect(pushState).not.toHaveBeenCalled();
expect(replaceState).not.toHaveBeenCalled();
expect(locationReplace).not.toHaveBeenCalled();
});

it('should do pushState with a URL only adding a trailing slash after the path', function() {
browser.url('http://server/foo');

pushState.calls.reset();
replaceState.calls.reset();
locationReplace.calls.reset();

browser.url('http://server/foo/');
expect(pushState).toHaveBeenCalledOnce();
expect(fakeWindow.location.href).toEqual('http://server/foo/');
});

it('should do pushState with a URL only removing a trailing slash after the path', function() {
browser.url('http://server/foo/');

pushState.calls.reset();
replaceState.calls.reset();
locationReplace.calls.reset();

browser.url('http://server/foo');
expect(pushState).toHaveBeenCalledOnce();
expect(fakeWindow.location.href).toEqual('http://server/foo');
});
};
}
});
Expand Down Expand Up @@ -812,7 +880,7 @@ describe('browser', function() {
it('should not fire urlChange if changed by browser.url method', function() {
sniffer.history = false;
browser.onUrlChange(callback);
browser.url('http://new.com');
browser.url('http://new.com/');

fakeWindow.fire('hashchange');
expect(callback).not.toHaveBeenCalled();
Expand Down Expand Up @@ -1092,7 +1160,7 @@ describe('browser', function() {
it('should not interfere with legacy browser url replace behavior', function() {
inject(function($rootScope) {
var current = fakeWindow.location.href;
var newUrl = 'notyet';
var newUrl = 'http://notyet/';
sniffer.history = false;
expect(historyEntriesLength).toBe(1);
browser.url(newUrl, true);
Expand Down
Loading