73 Commits
Author SHA1 Message Date
Elliot Jordan ec29863507 Catch Ctrl-C and print summary before exiting 2023-10-28 08:23:11 -07:00
Elliot Jordan c6f9bf25a5 Reapply Python black formatting 2023-10-25 05:53:23 -07:00
Nick McSpadden bd8ef7b0aa Merge branch 'dev' of https://github.com/autopkg/autopkg into dev 2023-09-21 15:38:36 -07:00
Nick McSpadden 7f74e8207d Fixing broken test import 2023-09-21 14:59:44 -07:00
github-actions 0fd6d863bd pre-commit auto fixes 2023-09-21 03:26:50 +00:00
Nick McSpadden dd2b22c78b Changed find_recipe_by names, added tests 2023-09-20 20:25:57 -07:00
Nick McSpadden 46ed95fa1c Renaming autopkglib.github to autopkglib.apgithub 2023-08-23 08:34:05 -07:00
Nick McSpadden 3cccd32574 Added GHReleasesInfoProvider test recipe 2023-08-21 20:28:46 -07:00
Nick McSpadden 990064b0a7 Fixing gh token in tests 2023-08-21 17:38:55 -07:00
Elliot Jordan 89dc99bc32 Merge pull request #881 from autopkg/dev_newghapi
New GitHub API → Dev
2023-08-21 12:10:02 -07:00
Elliot Jordan 2233bd6b9d Add end-to-end test for comparing exitcodes between branches 2023-08-21 11:55:08 -07:00
Elliot Jordan 54ec7094f2 Add Apache 2.0 license header to tests 2023-08-21 11:54:38 -07:00
Nick McSpadden de6b3aaf14 Moving gh token 2023-08-14 13:59:13 -07:00
Nick McSpadden 8edcf6e555 Merge branch 'dev' of https://github.com/autopkg/autopkg into dev 2023-08-14 12:50:22 -07:00
Nick McSpadden 49b88e7c6d Removing references to GITHUB_TOKEN 2023-08-14 12:50:17 -07:00
github-actions aa60c00273 pre-commit auto fixes 2023-08-14 18:12:56 +00:00
Nick McSpadden f2c9b5beb4 Changing some import paths around autopkg 2023-08-14 11:09:59 -07:00
Nick McSpadden f0729cf8fd Skipping all GH unit tests for now 2023-08-13 23:56:37 -05:00
Nick McSpadden 3f75fede88 Fixing PkgCopier test 2023-07-25 09:20:10 -07:00
Nick McSpadden a978078245 Fixing test lints 2023-07-24 10:58:33 -07:00
github-actions 4ef56ca58e pre-commit auto fixes 2023-07-20 17:58:54 +00:00
Nick McSpadden 4fe6e9e6b0 Now specify arch in pkginfo filenames 2023-07-20 10:58:11 -07:00
JGStew 5feb00f465 add test recipe, adjust automated test https://github.com/autopkg/autopkg/pull/796 2022-04-14 09:05:38 -04:00
JGStew 874229e26f Create ReadMe.md 2022-04-10 18:39:01 -04:00
Matthew Warren 3e0441427d Add asset_url output variable to GitHubReleasesInfoProvider (#779)
* Add  output variable to GitHubReleasesInfoProvider.

* Add asset_url test for GitHubReleasesInfoProvider
2021-12-15 07:59:36 -08:00
Nick McSpadden f14ebc5b6b Fixing bug in test_prefs_object_is_empty 2021-11-11 12:05:46 -08:00
Nick McSpadden f8f3e91460 Slight improvement to test_set_pref_mac() logic 2021-11-11 11:42:45 -08:00
Nick McSpadden 9dd108bb58 Fixing two broken tests 2021-11-11 11:08:10 -08:00
Elliot Jordan 3386db7dfc Set version pattern as attribute; handle double-digit versions better 2021-06-04 13:21:03 -07:00
Elliot Jordan 4da1466747 Create very basic GitHubReleasesInfoProvider tests 2021-06-04 13:13:57 -07:00
Elliot Jordan c701f1f021 Add unit tests for repo expansion 2021-03-02 21:15:14 -08:00
Elliot Jordan a922feaf25 Fix python shebang 2021-02-22 20:24:00 -08:00
Elliot Jordan ec44318fa4 Update tests to patch sys.platform instead of platform.platform 2020-12-07 10:04:33 -08:00
Elliot Jordan d586e2726a Reapply Python black format 2020-09-09 15:47:14 -07:00
Brian Smith d677612aea Preferences class unit tests
Tests are important.
2020-08-25 16:33:04 -07:00
Brian Smith 00c8b29d60 Bugfix: Correctly skip choco tests on macOS
Looks like `subprocess` raises `FileNotFound` when the requested binary
is not found in `$PATH`. Catch that so that tests are successfully
skipped when running Windows-only tests.
2020-08-06 16:07:59 -07:00
Brian Smith 636a8911e9 Merge branch 'master' into dev 2020-08-05 13:55:47 -07:00
Brian Smith 8e15461b3b Windows: Versioner can read zip files
This allows direct introspection of `version.plist` files from zip
archives, such as the autopkg source zip downloaded by
`AutoPkgGitMaster.nupkg.recipe` from GitHub.

For zip files only, Versioner can also now optionally ignore a single
root directory, which faciliates content extraction from sources such as
GitHub source archives, which have a root directory:
`user-project-truncatedhash`. Since it's extremely difficult to know the
truncated hash ahead of time, `skip_single_root_dir` will interpret any
path as relative to it.

An exception is raised if there is more than one root directory in the
archive and the flag is set.
2020-07-31 17:53:38 -07:00
Brian Smith 5a94923b43 Windows: Unarchiver processor native python
Add a native python decompression path to support Windows. Add unit
tests to validate both the new code, and the original utility based
code.
2020-07-31 11:02:47 -07:00
Brian Smith e4669639c2 Add test helper utility to load processor modules 2020-07-31 11:02:47 -07:00
Brian Smith 25967d0b06 Windows: Fix some unittest typing
The testsuite `test_chocolatey_packager` had some incorrect typing that
I somehow overlooked. Fix this.
2020-07-31 11:02:47 -07:00
Michal Moravec b127ff75fc Duplicate mock code to each test method 2020-07-30 14:29:17 +02:00
Michal Moravec 01f75188c2 Add Versioner unittest class 2020-07-30 14:29:17 +02:00
Brian Smith 3ae1a88e62 Windows: Add Chocolatey packaging processor
This processor creates chocolatey packages. It currently only supports
relatively simple packages, owing to its support classes which generate
build specifications also being relatively simple. Experience will tell
where additional improvements are necessary.
2020-07-21 18:30:15 -07:00
Brian Smith 415e51decf Windows: Add generators for chocolatey build files
Chocolatey needs a couple different kinds of build files to specify how
and what to package:
* A `.nuspec` that describes basic package metadata such as version.
* A `chocolateyInstall.ps1` that is executed during package install.

This commit adds classes that wrap the generation for simple cases.
2020-07-14 12:46:29 -07:00
Brian Smith 424b8df2ec Add signtool verification processor.
This complements the macOS CodeSignatureVerifier processor.

NOTE: The unittests *only* run on Windows platforms, as `signtool.exe`
is required.
2020-07-13 18:05:19 -07:00
Brian Smith ea41539576 Remove unused memoize class.
It was commented out in all usages. It actualy exists in the standard
library anyway should it be needed again. And, there was a stale and
confusing comment involving unit tests that implied fragility that
didn't exist.
2020-07-10 17:08:14 -07:00
Brian Smith 6b71a29638 Add platform independent way to find a utility.
There are several places where autopkg attempts to discover the location
of a utility, such as `curl`. This abstracts it so that on new
platforms, the discovery logic does not need to be changed in many
places.
2020-06-30 21:26:54 -07:00
Brian Smith dabda0b1e2 Windows: Support default preference loading
Adds a default preference/config path at
`C:\Users\username\AppData\Local\Autopkg\config.{plist,json}`.
2020-06-30 21:26:54 -07:00
Brian Smith c05a5d9612 Force normalized (LF) line endings for all files.
Windows support introduces the possibility of files having different
line ending conventions. There are already examples of this in the
repository despite the macOS specific nature of the tool.

This commit fixes all existing instances of CRLF endings, and ensures
that no inconsistencies can be accidentally introduced later. Should the
need arise it will still be possible to commit a file with CRLF.
2020-06-30 21:26:54 -07:00