Skip to content

Commit

Permalink
chore: fix HostRule type
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed May 1, 2021
1 parent a67ef2a commit 915bd15
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/config/migration.spec.ts
Expand Up @@ -155,7 +155,7 @@ describe(getName(), () => {
},
],
raiseDeprecationWarnings: false,
};
} as any;
const parentConfig = { ...defaultConfig, semanticCommits: 'disabled' };
const { isMigrated, migratedConfig } = configMigration.migrateConfig(
config,
Expand Down
4 changes: 0 additions & 4 deletions lib/types/host-rules.ts
@@ -1,17 +1,13 @@
export interface HostRule {
authType?: string;
endpoint?: string;
host?: string;
hostType?: string;
domainName?: string;
hostName?: string;
json?: true;
baseUrl?: string;
token?: string;
username?: string;
password?: string;
insecureRegistry?: boolean;
platform?: string;
timeout?: number;
encrypted?: HostRule;
abortOnError?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions lib/util/host-rules.spec.ts
Expand Up @@ -69,11 +69,11 @@ describe(getName(), () => {
});
it('matches on empty rules', () => {
add({
json: true,
enabled: true,
});
expect(
find({ hostType: datasourceNuget.id, url: 'https://api.github.com' })
).toEqual({ json: true });
).toEqual({ enabled: true });
});
it('matches on hostType', () => {
add({
Expand Down
4 changes: 2 additions & 2 deletions lib/workers/global/index.spec.ts
Expand Up @@ -50,7 +50,7 @@ describe(getName(), () => {
hostRules: [
{
hostType: datasourceDocker.id,
host: 'docker.io',
domainName: 'docker.io',
username: 'some-user',
password: 'some-password',
},
Expand All @@ -70,7 +70,7 @@ describe(getName(), () => {
hostRules: [
{
hostType: datasourceDocker.id,
host: 'docker.io',
domainName: 'docker.io',
username: 'some-user',
password: 'some-password',
},
Expand Down

0 comments on commit 915bd15

Please sign in to comment.