feat: add skiplists for auto_req and auto_prov
This commit is contained in:
		| @@ -100,13 +100,19 @@ func e2eSpawn(runnable e2e.Runnable, command e2e.Command, timeout time.Duration, | ||||
|  | ||||
| var ALL_SYSTEMS []string = []string{ | ||||
| 	"ubuntu-24.04", | ||||
| 	// "alt-sisyphus", | ||||
| 	"alt-sisyphus", | ||||
| 	"fedora-41", | ||||
| 	// "archlinux", | ||||
| 	// "alpine", | ||||
| 	// "opensuse-leap", | ||||
| 	// "redos-8", | ||||
| } | ||||
|  | ||||
| var AUTOREQ_AUTOPROV_SYSTEMS []string = []string{ | ||||
| 	"alt-sisyphus", | ||||
| 	"fedora-41", | ||||
| } | ||||
|  | ||||
| var COMMON_SYSTEMS []string = []string{ | ||||
| 	"ubuntu-24.04", | ||||
| } | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| FROM registry.altlinux.org/sisyphus/alt:latest | ||||
| RUN apt-get update && apt-get install -y ca-certificates | ||||
| RUN apt-get update && apt-get install -y ca-certificates rpm-build | ||||
| RUN useradd -m -s /bin/bash alr-user | ||||
| USER alr-user | ||||
| WORKDIR /home/alr-user | ||||
| ENTRYPOINT ["tail", "-f", "/dev/null"] | ||||
							
								
								
									
										8
									
								
								e2e-tests/images/Dockerfile.fedora-41
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								e2e-tests/images/Dockerfile.fedora-41
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| FROM fedora:41 | ||||
| RUN dnf install -y ca-certificates sudo rpm-build | ||||
| RUN useradd -m -s /bin/bash alr-user && \ | ||||
|     echo "alr-user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/alr-user && \ | ||||
|     chmod 0440 /etc/sudoers.d/alr-user | ||||
| USER alr-user | ||||
| WORKDIR /home/alr-user | ||||
| ENTRYPOINT ["tail", "-f", "/dev/null"] | ||||
							
								
								
									
										80
									
								
								e2e-tests/issue_41_autoreq_skiplist_test.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										80
									
								
								e2e-tests/issue_41_autoreq_skiplist_test.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,80 @@ | ||||
| // ALR - Any Linux Repository | ||||
| // Copyright (C) 2025 Евгений Храмов | ||||
| // | ||||
| // This program is free software: you can redistribute it and/or modify | ||||
| // it under the terms of the GNU General Public License as published by | ||||
| // the Free Software Foundation, either version 3 of the License, or | ||||
| // (at your option) any later version. | ||||
| // | ||||
| // This program is distributed in the hope that it will be useful, | ||||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
| // GNU General Public License for more details. | ||||
| // | ||||
| // You should have received a copy of the GNU General Public License | ||||
| // along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||
|  | ||||
| //go:build e2e | ||||
|  | ||||
| package e2etests_test | ||||
|  | ||||
| import ( | ||||
| 	"testing" | ||||
|  | ||||
| 	"github.com/alecthomas/assert/v2" | ||||
| 	"github.com/efficientgo/e2e" | ||||
| ) | ||||
|  | ||||
| func TestE2EIssue41AutoreqSkiplist(t *testing.T) { | ||||
| 	dockerMultipleRun( | ||||
| 		t, | ||||
| 		"issue-41-autoreq-skiplist", | ||||
| 		AUTOREQ_AUTOPROV_SYSTEMS, | ||||
| 		func(t *testing.T, r e2e.Runnable) { | ||||
| 			err := r.Exec(e2e.NewCommand( | ||||
| 				"alr", | ||||
| 				"addrepo", | ||||
| 				"--name", | ||||
| 				"alr-repo", | ||||
| 				"--url", | ||||
| 				"https://gitea.plemya-x.ru/Maks1mS/repo-for-tests.git", | ||||
| 			)) | ||||
| 			assert.NoError(t, err) | ||||
|  | ||||
| 			err = r.Exec(e2e.NewCommand( | ||||
| 				"alr", | ||||
| 				"ref", | ||||
| 			)) | ||||
| 			assert.NoError(t, err) | ||||
|  | ||||
| 			err = r.Exec(e2e.NewCommand( | ||||
| 				"alr", | ||||
| 				"build", | ||||
| 				"-p", | ||||
| 				"alr-repo/test-autoreq-autoprov", | ||||
| 			)) | ||||
| 			assert.NoError(t, err) | ||||
|  | ||||
| 			err = r.Exec(e2e.NewCommand( | ||||
| 				"sh", | ||||
| 				"-c", | ||||
| 				"rpm -qp --requires *.rpm | grep \"^/bin/sh$\"", | ||||
| 			)) | ||||
| 			assert.NoError(t, err) | ||||
|  | ||||
| 			err = r.Exec(e2e.NewCommand( | ||||
| 				"sh", | ||||
| 				"-c", | ||||
| 				"rpm -qp --requires *.rpm | grep \"^/bin/bash$\"", | ||||
| 			)) | ||||
| 			assert.Error(t, err) | ||||
|  | ||||
| 			err = r.Exec(e2e.NewCommand( | ||||
| 				"sh", | ||||
| 				"-c", | ||||
| 				"rpm -qp --requires *.rpm | grep \"^/bin/zsh$\"", | ||||
| 			)) | ||||
| 			assert.Error(t, err) | ||||
| 		}, | ||||
| 	) | ||||
| } | ||||
		Reference in New Issue
	
	Block a user