wget – get Jenkins Mire file update-center.json in the local repository & # 39; SHA-512 Digest Mismatch & # 39;

I use & wget -m & # 39; to mirror the latest Jenkins plugins and the update-center.json file to my local repository. My goal is for the URL to point to my local repo. If I update Jenkins plugins, I can manage Jenkins -> Manage plugins -> Get updates from my local plugins repo. What I did was:

  1. Go to Manage Jenkins -> Manage Plugins -> Advanced, and point the URL of the Update Center to http: //localRepo/update-center.json

  2. Modify my local update-center.json file so that the plugins download URL points to http: //localRepo/plugins/xx.hpi. For example, change the following in update-center.json:

    "title": "Git Client", "url": "http://updates.jenkins-ci.org/download/plugins/git-client/x.x/git-client.hpi

to:

"title":"Git Client", "url":"http://localRepo/plugins/git-client.hpi

After all this was done, I clicked "Submit" and "Check Now" under "Manage Jenkins" -> "Manage Plugins" -> "Advanced". The following error message was displayed:

There were errors checking the update sites: SHA-512digest mismatch:
expected=xxxxxxxxxx; update site &#xxx;default...

So my questions are:
1. With which file does the system compare my local checksum update-center.json?
2. I have generated with openssl key and certificate. How do I use the CRT file to self-sign the locally modified update-center.json file? Do I save a .crt file under $ Jenkins_HOME / and change a configuration file to point to a .crt file?

git – How to clone a part in the repository without cloning it into bitbucket?

I want to create a repository inside the bitbucket, but the structure I'm planning is so complicated.

I have planned the structure like this

 MAIN_REPOSITORY

    REPOSITORY1

    REPOSITORY2

    REPOSITORY3

MAIN_REPOSITORY also contains repository lists. This is because each repository in MAIN_REPOSITORY can only be accessed by a specific user, so Repository1 users can not access REPOSITORY2 and REPOSITORY3, and vice versa. And if there is a problem in REPOSITORY1, the user will only clone the REPOSITORY1, not the MAIN_REPOSITORY.

PHP – How to test and what kinds of test to write for request handlers that use repository level?

Consider the following class:

class FillTestBySerialHandler
{

    /**
     *
     * @var FillTestBySerialRepository
     */
    private $fillTestBySerialRepository;

    function __construct(FillTestBySerialRepository $fillTestBySerialRepository)
    {
        $this->fillTestBySerialRepository = $fillTestBySerialRepository;
    }

    function handle(): ResponseInterface
    {
        $serial = filter_var($_GET('serial'), FILTER_VALIDATE_INT);

        if (is_int($serial))
            $row = $this->fillTestBySerialRepository->getDataBySerial($serial);
        else
            $row('error') = 'Error: Invalid serial number.';

        return new JsonResponse($row);
    }
}

This is a request handler that receives a serial number, verifies that it is an integer, and sends the command $serial Repository layer to get some data.

The data is returned in an array form, compiled in JSON, and sent back to the caller.

This may be confusing, but my use case is for a Web "test", where "test" is the name for the business logic. Do not confuse the use case "Test" with the component test!

I want to write tests for this class. Which tests should be written if I want to test the class and want to be sure that it is a real problem that needs to be investigated if the tests are interrupted?


I do the following now – I wrote two tests.

I mocked that FillTestBySerialRepository Class with fake data and uses it to test the FillTestBySerialHandler, This means that even if my real database fails or the structure or data changes, my test will NOT fail and still pass because FillTestBySerialRepository is ridiculed.

After writing this test, I thought well of how I know the database is broken. So I wrote another test to test that FillTestBySerialRepository, That is, only mocked data is compared to those retrieved from the real database at the time of the test. If this breaks, I know that the database has changed and is the cause of the error.

But then I thought if I'm doing that, why am I mocking up the database data? Why not just rewrite the first test with real data without mockups.

At this point, I think I need advice on testing my handlers, and I'm here. Please help! What types of tests are normally written for handlers with repository layers? (Handler belongs to the same class as Controller / Action in PHP Framework).

Wallet – If I send a BTC to an offline repository, does the transaction appear in the blockchain when I send it, or when I receive it, or not at all?

It seems you have a misunderstanding about how Bitcoin transactions work.

Transactions are not things that are sent directly to the recipient. The recipient does not need to be online to receive Bitcoin, as he does not have to do anything to confirm a transaction. If you are a Bitcoin person, the transaction you create is instead sent to the entire Bitcoin network. Whether the recipient receives the transaction is irrelevant.

Once the transaction has been sent to the Bitcoin network, a miner should include it in a block and become part of the blockchain. Being in a block means that the transaction has been "confirmed". While it is not in a block, it is "unconfirmed".

If the recipient is offline when sending the transaction and the transaction is confirmed (i.e., contained in a block) while it is offline, it sees the transaction in the blockchain while synchronizing the blockchain.


In your example, the transaction is sent to the network, and a miner inserts your transaction into a block. It will not be displayed in the blockchain when you send it, but it will be displayed in the blockchain shortly thereafter. It does not matter if your cold store wallet is offline or online because the recipient does not have to do anything to get Bitcoin.

Block Explorer generally listen to unconfirmed transactions in the Bitcoin network. Once they receive your unconfirmed transaction, they make it searchable. If they do not see it, once it's in a block and they get the block containing it, they'll show it too.

Spring Boot – Error executing UT – BeanCreationException No property update found. Custom repository

While running under UT & # 39; CarRepositoryTest & # 39; the following error is displayed: Is a configuration missing here?

Trigger: org.springframework.beans.factory.BeanCreationException: Error creating bean with name: itemRepository & # 39 ;: call of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create the query for the public abstract void com.dms.repository.interfaces.CustomItemRepository.update (java.util.List) method! No real estate update was found for the type InventoryItemEntity!

Commented with UT with EnableJpaRepositories ((basePackages and repositoryFactoryBeanClass)

@RunWith(SpringRunner.class)
@DataJpaTest
@EnableJpaRepositories(basePackages = {"com.dms.repository",
                                        "com.dms.repository.interface"},
                        repositoryFactoryBeanClass = BaseRepositoryFactoryBean.class)
@EntityScan(basePackageClasses = Car.class)
public class CarRepositoryTest {
    @Autowired private CarRepository repository;
    @Autowired private TestEntityManager testEntityManager;

    @Test
    public void getCar_returnsCarDetails() throws Exception {
        final String s = GenerateUUID.generateUUID();
        Car savedCar = testEntityManager.persistFlushFind(new Car(s, "hybrid"));
        Car car = this.repository.findByName(s);
        assertNotNull(car);
        assertThat(car.getName(), is(s));
        assertThat(car.getType(), is("hybrid"));
    }
}

@Configuration
@EnableJpaRepositories( basePackages = "com.dms.repository",
                        entityManagerFactoryRef = "entityManagerFactory",
                        transactionManagerRef = "transactionManager",
                        repositoryFactoryBeanClass = BaseRepositoryFactoryBean.class)
@EnableTransactionManagement
public class JpaConfiguration {
...
}

package com.dms.repository;
@Repository
public class ItemRepositoryImpl implements CustomItemRepository {
    @PersistenceContext
    private EntityManager em;
    @Override
    public void update(List dtos) {
    ...
    }
}

package com.dms.repository.interfaces;
public interface CustomItemRepository {
    void update(List dtos);
}

package com.dms.repository;
public class BaseRepositoryFactoryBean, T,
        I extends Serializable> extends JpaRepositoryFactoryBean {

}

package com.dms.repository;
public class BaseRepositoryImpl extends SimpleJpaRepository implements BaseRepository {
    private final EntityManager em;
    @Transactional
    @Override
    public Specification searchUsingRSQLParser(String query) {
        return new RSQLParser().parse(query)
                .accept(new CustomRsqlVisitor<>());
    }
}

Which configuration should be added / changed so that UT does not fail with a custom repository?

Repository – Trusted repository for downloading Perl libraries on Centos 7

Good day people,

I am trying to install the OCS Agent on CentOS 7. This turns out when unzipping and compiling the package Ocsinventory Unix Agent 2.4.2.tar.gz, numerous library dependencies perl are required. I download some of these libraries and install the RPM file, which costs me a lot of time. Does anyone have any repositories other than EPEL, REMI, YUM that contain a lot of packages? perl to display me?