From 2d344b1a691f5c44c40562e2320346fbae590b77 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Tue, 1 Sep 2020 15:31:02 +0200 Subject: [PATCH] test: remove noisy snapshot --- .../init/__snapshots__/config.spec.ts.snap | 567 ------------------ lib/workers/repository/init/config.spec.ts | 2 +- 2 files changed, 1 insertion(+), 568 deletions(-) diff --git a/lib/workers/repository/init/__snapshots__/config.spec.ts.snap b/lib/workers/repository/init/__snapshots__/config.spec.ts.snap index 679719c9c7..2061f5ecc3 100644 --- a/lib/workers/repository/init/__snapshots__/config.spec.ts.snap +++ b/lib/workers/repository/init/__snapshots__/config.spec.ts.snap @@ -16,571 +16,4 @@ exports[`workers/repository/init/config detectRepoFileConfig() throws error if d exports[`workers/repository/init/config detectRepoFileConfig() uses package.json config if found 1`] = `Promise {}`; -exports[`workers/repository/init/config mergeRenovateConfig() continues if no errors 1`] = ` -Object { - "additionalBranchPrefix": "", - "additionalReviewers": Array [], - "aliases": Object {}, - "allowedPostUpgradeCommands": Array [], - "ansible": Object { - "fileMatch": Array [ - "(^|/)tasks/[^/]+\\\\.ya?ml$", - ], - }, - "ansible-galaxy": Object { - "fileMatch": Array [ - "(^|/)requirements\\\\.ya?ml$", - ], - }, - "assignAutomerge": false, - "assignees": Array [], - "assigneesFromCodeOwners": false, - "assigneesSampleSize": null, - "autodiscover": false, - "autodiscoverFilter": null, - "automerge": false, - "automergeComment": "automergeComment", - "automergeType": "pr", - "azureAutoComplete": false, - "azureWorkItemId": 0, - "baseBranches": Array [], - "baseDir": null, - "bazel": Object { - "fileMatch": Array [ - "(^|/)WORKSPACE(|\\\\.bazel)$", - "\\\\.bzl$", - ], - }, - "bbUseDefaultReviewers": true, - "binarySource": "auto", - "branchName": "{{{branchPrefix}}}{{{additionalBranchPrefix}}}{{{branchTopic}}}", - "branchPrefix": "renovate/", - "branchTopic": "{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x{{#if isLockfileUpdate}}-lockfile{{/if}}", - "buildkite": Object { - "additionalBranchPrefix": "buildkite-", - "commitMessageExtra": "to {{#if isMajor}}v{{{newMajor}}}{{else}}{{{newValue}}}{{/if}}", - "commitMessageTopic": "buildkite plugin {{depName}}", - "fileMatch": Array [ - "buildkite\\\\.ya?ml", - "\\\\.buildkite/.+\\\\.ya?ml$", - ], - }, - "bumpVersion": null, - "bundler": Object { - "fileMatch": Array [ - "(^|/)Gemfile$", - ], - "versioning": "ruby", - }, - "cacheDir": null, - "cargo": Object { - "additionalBranchPrefix": "rust-", - "commitMessageTopic": "Rust crate {{depName}}", - "fileMatch": Array [ - "(^|/)Cargo.toml$", - ], - "rangeStrategy": "bump", - "versioning": "cargo", - }, - "cdnurl": Object { - "fileMatch": Array [], - "versioning": "semver", - }, - "circleci": Object { - "fileMatch": Array [ - "(^|/).circleci/config.yml$", - ], - }, - "cocoapods": Object { - "fileMatch": Array [ - "(^|/)Podfile$", - ], - "versioning": "ruby", - }, - "commitBody": null, - "commitBodyTable": false, - "commitMessage": "{{{commitMessagePrefix}}} {{{commitMessageAction}}} {{{commitMessageTopic}}} {{{commitMessageExtra}}} {{{commitMessageSuffix}}}", - "commitMessageAction": "Update", - "commitMessageExtra": "to {{#if isMajor}}v{{{newMajor}}}{{else}}{{#if isSingleVersion}}v{{{toVersion}}}{{else}}{{{newValue}}}{{/if}}{{/if}}", - "commitMessagePrefix": null, - "commitMessageSuffix": null, - "commitMessageTopic": "dependency {{depName}}", - "compatibility": Object {}, - "composer": Object { - "fileMatch": Array [ - "(^|/)([\\\\w-]*)composer.json$", - ], - "versioning": "composer", - }, - "composerIgnorePlatformReqs": true, - "configWarningReuseIssue": true, - "dependencyDashboard": false, - "dependencyDashboardApproval": false, - "dependencyDashboardAutoclose": false, - "dependencyDashboardFooter": null, - "dependencyDashboardHeader": "This issue contains a list of Renovate updates and their statuses.", - "dependencyDashboardTitle": "Dependency Dashboard", - "deps-edn": Object { - "fileMatch": Array [ - "(^|/)deps\\\\.edn$", - ], - "versioning": "maven", - }, - "description": Array [], - "digest": Object { - "branchTopic": "{{{depNameSanitized}}}-digest", - "commitMessageExtra": "to {{newDigestShort}}", - "commitMessageTopic": "{{{depName}}} commit hash", - }, - "docker": Object { - "versioning": "docker", - }, - "docker-compose": Object { - "fileMatch": Array [ - "(^|/)docker-compose[^/]*\\\\.ya?ml$", - ], - }, - "dockerMapDotfiles": false, - "dockerUser": null, - "dockerfile": Object { - "fileMatch": Array [ - "(^|/|\\\\.)Dockerfile$", - "(^|/)Dockerfile\\\\.[^/]*$", - ], - }, - "dotnet": Object {}, - "draftPR": false, - "droneci": Object { - "fileMatch": Array [ - "(^|/).drone.yml$", - ], - }, - "dryRun": false, - "enabled": true, - "enabledManagers": Array [], - "encrypted": null, - "endpoint": null, - "errors": Array [], - "excludeCommitPaths": Array [], - "extends": Array [], - "fileMatch": Array [], - "followTag": null, - "force": null, - "forceCli": true, - "forkMode": false, - "git-submodules": Object { - "enabled": false, - "fileMatch": Array [ - "(^|/).gitmodules$", - ], - "versioning": "git", - }, - "gitAuthor": null, - "gitLabAutomerge": false, - "gitPrivateKey": null, - "github-actions": Object { - "fileMatch": Array [ - "^\\\\.github/main.workflow$", - "^\\\\.github/workflows/[^/]+\\\\.ya?ml$", - ], - "pinDigests": true, - }, - "gitlabci": Object { - "fileMatch": Array [ - "^\\\\.gitlab-ci\\\\.yml$", - ], - }, - "gitlabci-include": Object { - "fileMatch": Array [ - "^\\\\.gitlab-ci\\\\.yml$", - ], - }, - "golang": Object { - "commitMessageTopic": "module {{depNameShort}}", - }, - "gomod": Object { - "fileMatch": Array [ - "(^|/)go.mod$", - ], - }, - "gradle": Object { - "fileMatch": Array [ - "\\\\.gradle(\\\\.kts)?$", - "(^|/)gradle.properties$", - ], - "timeout": 600, - "versioning": "gradle", - }, - "gradle-wrapper": Object { - "fileMatch": Array [ - "(^|/)gradle/wrapper/gradle-wrapper.properties$", - ], - "versioning": "gradle", - }, - "group": Object { - "branchTopic": "{{{groupSlug}}}", - "commitMessageTopic": "{{{groupName}}}", - }, - "groupName": null, - "groupSlug": null, - "helm-requirements": Object { - "aliases": Object { - "stable": "https://kubernetes-charts.storage.googleapis.com/", - }, - "commitMessageTopic": "helm chart {{depName}}", - "fileMatch": Array [ - "(^|/)requirements.yaml$", - ], - }, - "helm-values": Object { - "commitMessageTopic": "helm values {{depName}}", - "fileMatch": Array [ - "(^|/)values.yaml$", - ], - "pinDigests": false, - }, - "helmfile": Object { - "aliases": Object { - "stable": "https://kubernetes-charts.storage.googleapis.com/", - }, - "commitMessageTopic": "helm chart {{depName}}", - "fileMatch": Array [ - "(^|/)helmfile.yaml$", - ], - }, - "helmv3": Object { - "aliases": Object { - "stable": "https://kubernetes-charts.storage.googleapis.com/", - }, - "commitMessageTopic": "helm chart {{depName}}", - "fileMatch": Array [ - "(^|/)Chart.yaml$", - ], - }, - "homebrew": Object { - "additionalBranchPrefix": "homebrew-", - "commitMessageTopic": "Homebrew Formula {{depName}}", - "fileMatch": Array [ - "^Formula/[^/]+[.]rb$", - ], - }, - "hostRules": Array [ - Object { - "timeout": 60000, - }, - ], - "html": Object { - "digest": Object { - "enabled": false, - }, - "fileMatch": Array [ - "\\\\.html?$", - ], - "pinDigests": false, - "versioning": "semver", - }, - "ignoreDeprecated": true, - "ignoreDeps": Array [], - "ignoreNpmrcFile": false, - "ignorePaths": Array [ - "**/node_modules/**", - "**/bower_components/**", - ], - "ignorePresets": Array [], - "ignoreScripts": false, - "ignoreUnstable": true, - "includeForks": false, - "includePaths": Array [], - "java": Object {}, - "jenkins": Object { - "fileMatch": Array [ - "(^|/)plugins\\\\.txt", - ], - }, - "js": Object {}, - "kubernetes": Object { - "fileMatch": Array [], - }, - "kustomize": Object { - "fileMatch": Array [ - "(^|/)kustomization\\\\.yaml", - ], - }, - "labels": Array [], - "leiningen": Object { - "fileMatch": Array [ - "(^|/)project\\\\.clj$", - ], - "versioning": "maven", - }, - "lockFileMaintenance": Object { - "branchTopic": "lock-file-maintenance", - "commitMessageAction": "Lock file maintenance", - "commitMessageExtra": null, - "commitMessageTopic": null, - "enabled": false, - "groupName": null, - "prBodyDefinitions": Object { - "Change": "All locks refreshed", - }, - "rebaseStalePrs": true, - "recreateClosed": true, - "schedule": Array [ - "before 5am on monday", - ], - }, - "logContext": null, - "logFile": null, - "logFileLevel": "debug", - "logLevel": "info", - "major": Object {}, - "maven": Object { - "fileMatch": Array [ - "\\\\.pom\\\\.xml$", - "(^|/)pom\\\\.xml$", - ], - "versioning": "maven", - }, - "meteor": Object { - "fileMatch": Array [ - "(^|/)package.js$", - ], - }, - "minor": Object {}, - "mix": Object { - "fileMatch": Array [ - "(^|/)mix\\\\.exs$", - ], - "versioning": "hex", - }, - "node": Object { - "commitMessageTopic": "Node.js", - "major": Object { - "enabled": false, - }, - }, - "nodenv": Object { - "fileMatch": Array [ - "^.node-version$", - ], - "versioning": "node", - }, - "npm": Object { - "fileMatch": Array [ - "(^|/)package.json$", - ], - "prBodyDefinitions": Object { - "Change": "[{{#if displayFrom}}\`{{{displayFrom}}}\` -> {{else}}{{#if currentValue}}\`{{{currentValue}}}\` -> {{/if}}{{/if}}{{#if displayTo}}\`{{{displayTo}}}\`{{else}}\`{{{newValue}}}\`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{fromVersion}}}/{{{toVersion}}}{{/if}})", - }, - "rollbackPrs": true, - "versioning": "npm", - }, - "npmToken": null, - "npmrc": null, - "nuget": Object { - "fileMatch": Array [ - "\\\\.(?:cs|fs|vb)proj$", - "\\\\.(?:props|targets)$", - "\\\\.config\\\\/dotnet-tools\\\\.json$", - ], - }, - "nvm": Object { - "fileMatch": Array [ - "(^|/)\\\\.nvmrc$", - ], - "versioning": "node", - }, - "onboarding": true, - "onboardingBranch": "renovate/configure", - "onboardingCommitMessage": null, - "onboardingConfig": Object { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - }, - "onboardingPrTitle": "Configure Renovate", - "optimizeForDisabled": false, - "packageRules": Array [], - "password": null, - "patch": Object {}, - "persistRepoData": false, - "php": Object {}, - "pin": Object { - "commitMessageAction": "Pin", - "group": Object { - "commitMessageExtra": "", - "commitMessageTopic": "dependencies", - }, - "groupName": "Pin Dependencies", - "groupSlug": "pin-dependencies", - "rebaseWhen": "behind-base-branch", - "recreateClosed": true, - "unpublishSafe": false, - }, - "pinDigests": false, - "pip_requirements": Object { - "fileMatch": Array [ - "(^|/)([\\\\w-]*)requirements.(txt|pip)$", - ], - }, - "pip_setup": Object { - "fileMatch": Array [ - "(^|/)setup.py$", - ], - }, - "pipenv": Object { - "fileMatch": Array [ - "(^|/)Pipfile$", - ], - }, - "platform": "github", - "poetry": Object { - "fileMatch": Array [ - "(^|/)pyproject\\\\.toml$", - ], - }, - "postUpdateOptions": Array [], - "postUpgradeTasks": Object { - "commands": Array [], - "fileFilters": Array [], - }, - "prBodyColumns": Array [ - "Package", - "Type", - "Update", - "Change", - ], - "prBodyDefinitions": Object { - "Change": "\`{{{displayFrom}}}\` -> \`{{{displayTo}}}\`", - "Current value": "{{{currentValue}}}", - "New value": "{{{newValue}}}", - "Package": "{{{depNameLinked}}}", - "Package file": "{{{packageFile}}}", - "References": "{{{references}}}", - "Type": "{{{depType}}}", - "Update": "{{{updateType}}}", - }, - "prBodyNotes": Array [], - "prBodyTemplate": "{{{header}}}{{{table}}}{{{notes}}}{{{changelogs}}}{{{configDescription}}}{{{controls}}}{{{footer}}}", - "prCommitsPerRunLimit": 0, - "prConcurrentLimit": 0, - "prCreation": "immediate", - "prFooter": "This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).", - "prHeader": null, - "prHourlyLimit": 0, - "prNotPendingHours": 25, - "prPriority": 0, - "prTitle": null, - "printConfig": false, - "privateKey": null, - "productLinks": Object { - "documentation": "https://docs.renovatebot.com/", - "help": "https://github.com/renovatebot/config-help/issues", - "homepage": "https://github.com/renovatebot/renovate", - }, - "pruneStaleBranches": true, - "pub": Object { - "fileMatch": Array [ - "(^|/)pubspec\\\\.ya?ml$", - ], - "versioning": "npm", - }, - "python": Object { - "versioning": "pep440", - }, - "rangeStrategy": "replace", - "rebaseLabel": "rebase", - "rebaseWhen": "auto", - "recreateClosed": false, - "redisUrl": null, - "regex": Object { - "pinDigests": false, - }, - "regexManagers": Array [], - "registryUrls": null, - "renovateJsonPresent": true, - "repositories": Array [], - "repositoryCache": "disabled", - "requireConfig": true, - "requiredStatusChecks": Array [], - "respectLatest": true, - "reviewers": Array [], - "reviewersFromCodeOwners": false, - "reviewersSampleSize": null, - "rollbackPrs": false, - "ruby": Object {}, - "ruby-version": Object { - "fileMatch": Array [ - "(^|/)\\\\.ruby-version$", - ], - "versioning": "ruby", - }, - "rust": Object {}, - "sbt": Object { - "fileMatch": Array [ - "\\\\.sbt$", - "project/[^/]*.scala$", - ], - "versioning": "ivy", - }, - "schedule": Array [ - "at any time", - ], - "semanticCommitScope": "deps", - "semanticCommitType": "chore", - "semanticCommits": null, - "separateMajorMinor": true, - "separateMinorPatch": false, - "separateMultipleMajor": false, - "setup-cfg": Object { - "fileMatch": Array [ - "(^|/)setup\\\\.cfg$", - ], - "versioning": "pep440", - }, - "skipInstalls": null, - "stabilityDays": 0, - "supportPolicy": Array [], - "suppressNotifications": Array [ - "deprecationWarningIssues", - ], - "swift": Object { - "fileMatch": Array [ - "(^|/)Package\\\\.swift", - ], - "rangeStrategy": "bump", - "versioning": "swift", - }, - "terraform": Object { - "commitMessageTopic": "Terraform {{managerData.terraformDependencyType}} {{depNameShort}}", - "fileMatch": Array [ - "\\\\.tf$", - ], - "versioning": "hashicorp", - }, - "timezone": null, - "token": null, - "travis": Object { - "fileMatch": Array [ - "^.travis.yml$", - ], - "versioning": "node", - }, - "trustLevel": "low", - "unicodeEmoji": true, - "unpublishSafe": false, - "updateLockFiles": true, - "updateNotScheduled": true, - "username": null, - "versioning": "semver", - "vulnerabilityAlerts": Object { - "commitMessageSuffix": "[SECURITY]", - "dependencyDashboardApproval": false, - "groupName": null, - "rangeStrategy": "update-lockfile", - "schedule": Array [], - }, - "warnings": Array [], - "yarnrc": null, -} -`; - exports[`workers/repository/init/config mergeRenovateConfig() throws error if misconfigured 1`] = `[Error: config-validation]`; diff --git a/lib/workers/repository/init/config.spec.ts b/lib/workers/repository/init/config.spec.ts index 43ae3fa492..fb393aeb1f 100644 --- a/lib/workers/repository/init/config.spec.ts +++ b/lib/workers/repository/init/config.spec.ts @@ -121,7 +121,7 @@ describe('workers/repository/init/config', () => { warnings: [], errors: [], }); - expect(await mergeRenovateConfig(config)).toMatchSnapshot(); + expect(await mergeRenovateConfig(config)).not.toBeUndefined(); }); }); }); -- GitLab