Skip to content

Commit

Permalink
Adjust RPM tests for changes in Fedora 41
Browse files Browse the repository at this point in the history
  • Loading branch information
akurtakov committed Jan 5, 2025
1 parent 1eeaefa commit fbaf745
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2013, 2023 Red Hat, Inc.
* Copyright (c) 2013, 2025 Red Hat, Inc.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand All @@ -20,6 +20,7 @@
import java.io.File;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URL;

import org.eclipse.core.resources.IContainer;
Expand Down Expand Up @@ -212,16 +213,16 @@ public void checkPreparedSources(RPMProject project, RPMProjectLayout layout) th
switch (layout) {
case RPMBUILD:
assertNotNull(buildFolder.getParent().findMember("BUILD"));
assertEquals(2, buildFolder.members().length);
assertEquals(1, buildFolder.members().length);
// check if the file exists under BUILD folder
helloBuildFolder = buildFolder.getFolder(new Path("hello-2.12.1"));
helloBuildFolder = buildFolder.getFolder(new Path("hello-2.12.1-build"));
assertTrue(helloBuildFolder.exists());
// there should be some stuff within hello-2.8/ folder
assertTrue(helloBuildFolder.members().length >= 1);
break;
case FLAT:
assertEquals(10, buildFolder.members().length);
helloBuildFolder = buildFolder.getFolder(new Path("hello-2.12.1"));
assertEquals(9, buildFolder.members().length);
helloBuildFolder = buildFolder.getFolder(new Path("hello-2.12.1-build"));
assertTrue(helloBuildFolder.exists());
// there should be some stuff within hello-2.12.1/ folder
assertTrue(helloBuildFolder.members().length >= 1);
Expand All @@ -238,7 +239,7 @@ public void checkPreparedSources(RPMProject project, RPMProjectLayout layout) th
*/
public void downloadFile(RPMProject project) throws IOException, InterruptedException {
// connect to the URL
URL url = new URL("http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz");
URL url = URI.create("http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz").toURL();
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());

Expand Down

0 comments on commit fbaf745

Please sign in to comment.