mirror of
https://github.com/google/nomulus.git
synced 2025-05-20 03:09:33 +02:00
Create ICANN report upload action
This is the first step in moving the current []cron-Python reporting scripts into App Engine, as an official part of the Nomulus package. This copies the structure of RDE uploads, with a few changes specific to monthly reporting. I've left some TODOs related to actually testing it on the ICANN endpoint, as we're still not sure how files to be uploaded will be staged, and whether we can actually ping their endpoint on valid ports (80 or 443). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=160408703
This commit is contained in:
parent
f721bda16d
commit
4130a8a75e
18 changed files with 775 additions and 1 deletions
32
javatests/google/registry/reporting/ReportingTestData.java
Normal file
32
javatests/google/registry/reporting/ReportingTestData.java
Normal file
|
@ -0,0 +1,32 @@
|
|||
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.reporting;
|
||||
|
||||
import com.google.common.io.ByteSource;
|
||||
import com.google.common.io.Resources;
|
||||
import java.net.URL;
|
||||
|
||||
/** Utility class providing easy access to contents of the {@code testdata/} directory. */
|
||||
public final class ReportingTestData {
|
||||
|
||||
/** Returns {@link ByteSource} for file in {@code reporting/testdata/} directory. */
|
||||
public static ByteSource get(String filename) {
|
||||
return Resources.asByteSource(getUrl(filename));
|
||||
}
|
||||
|
||||
private static URL getUrl(String filename) {
|
||||
return Resources.getResource(ReportingTestData.class, "testdata/" + filename);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue